I am looking for a way to look up Cognito identity pool id from Cognito user pool identity.
My used case is that I have a workflow that runs for a user every time they create a record in the dynamo DB table. I want my workflow to write to a storage location that is readable by the user.
The record contains an owner field because I have followed this guide to restrict access by owner. This owner field is the Cognito User Pool ID.
My workflow needs to write to a s3 key that is specific to the customer. I configured storage to grant per-user access following this guide. That guide grants per-user access following the user's Identity Pool ID. However, the workflow has no direct way of figuring out what that S3 key is because my mutations only contain the user pool id. A solution would be to give the workflow a way to deduce identity pool ID from user pool ID.
Environment information
Description
I am looking for a way to look up Cognito identity pool id from Cognito user pool identity.
My used case is that I have a workflow that runs for a user every time they create a record in the dynamo DB table. I want my workflow to write to a storage location that is readable by the user.
The record contains an
owner
field because I have followed this guide to restrict access by owner. Thisowner
field is the Cognito User Pool ID.My workflow needs to write to a s3 key that is specific to the customer. I configured storage to grant per-user access following this guide. That guide grants per-user access following the user's Identity Pool ID. However, the workflow has no direct way of figuring out what that S3 key is because my mutations only contain the user pool id. A solution would be to give the workflow a way to deduce identity pool ID from user pool ID.