Map from federated identity pool to Cognito user pool

1

I have a Cognito federated identity pool which uses a Cognito User Pool as an authentication provider.

I use Amplify Storage API to upload a file to S3 in a bucket. The object key is stored with a prefix of the identity id from the federated identity pool (e.g. eu-west-2:ce19be59-769d-4ca7-8c9b-c99a368666cf)

How can I map this to the cognito pool user sub that was used for the authentication? i.e. the user from the linked login cognito-idp.eu-west-2.amazonaws.com/eu-west-2_UbEEmSmxO

1 個回答
0

Hi,

you need to do 2 operations towards Cognito Federated Identities see https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flow.html:

for more details, please look at this example: https://catalog.workshops.aws/wyld-pets-cognito/en-US/60-lab3-identity-pools-sdk

Jeff

AWS
已回答 1 年前
profile picture
專家
已審閱 24 天前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南