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 Antwort
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
beantwortet vor einem Jahr
profile picture
EXPERTE
überprüft vor 25 Tagen

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen