Open JeremyJonas opened 3 years ago
+1
I am also trying to get the cognitoIdentifyId using IAM but it keeps returning null despite the documentation describing as returning a string.
I would love to know more about how I can get this id because my app depends heavily on me figuring this out.
Is your feature request related to a problem? Please describe. The GraphQL Auth docs does not specify any details around
AUTH_TYPE.AWS_IAM
being required to get$context.indentity.congnitoIdentityId
during AppSync resolvers.When using a Cognito User Pool with Federated Identity, and following the cognito s3 access docs, there is no mention that to have this value in your resolvers you must use
IAM
auth and would assume the use ofAMAZON_COGNITO_USER_POOLS
.The reference I have found for this detail is from a forum post - https://forums.aws.amazon.com/thread.jspa?threadID=292671
Describe the solution you'd like Add doc/guide describing how to get
$context.identity.cognitoIdentityId
in AppSync resolvers.Reference that material in:
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context When using the IAM policy for cognito user access to s3 buckets based on cognito identity (example) the resolvers for your AppSync API need to be able to retrieve this information from the request in order to perform actions on behalf of users.
cognitoIdenityId
cognitoIdenityId
cognitoIdenityId
Searching google produces confusion in this area