QuestionQ40

VerifiedSecurity

A gaming application stores player scores in an Amazon DynamoDB table with four attributes: user_id, user_name, user_score, and user_rank. Users are permitted to update only their names. A user is authenticated through web identity federation.

Which set of conditions should be added to the policy attached to the role for the dynamodb:PutItem API call?

Explanation

dynamodb:LeadingKeys restricts access to items whose partition-key value matches the authenticated federated user's ${www.amazon.com:user_id}. When using dynamodb:Attributes, the policy must include the permitted mutable attribute, user_name, and all primary-key attributes; therefore user_id must also be listed. This confines the request to the user's own item and to the name plus its required key attribute.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!