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 Answer
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
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions