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 with permissions for dynamodb:GetItem
, dynamodb:BatchGetItem
, dynamodb:Query
, and dynamodb:Scan
and attach it to the microservice's IAM role
Grant 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
Create an IAM policy that includes dynamodb:PutItem
and dynamodb:UpdateItem
and attach it to the microservice's IAM role