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 天前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则