AWS Certified Developer Associate DVA-C02 Practice Question
Your company is deploying a new microservice on AWS that will access an Amazon DynamoDB table to only read records. As an AWS developer, you are tasked with ensuring that the microservice's access adheres to the principle of least privilege. Which of the following would be the most appropriate action to take?
Create an IAM policy that includes
dynamodb:PutItem
anddynamodb:UpdateItem
and attach it to the microservice's IAM roleCreate an IAM policy with permissions for
dynamodb:GetItem
,dynamodb:BatchGetItem
,dynamodb:Query
, anddynamodb:Scan
and attach it to the microservice's IAM roleGrant the microservice full access to the Amazon DynamoDB table
Remove any DynamoDB permissions from the microservice as it can assume the required permissions dynamically at runtime