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
エキスパート
レビュー済み 25日前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ