exam questions

Exam AWS Certified SysOps Administrator - Associate All Questions

View all questions & answers for the AWS Certified SysOps Administrator - Associate exam

Exam AWS Certified SysOps Administrator - Associate topic 1 question 376 discussion

A company has a multi-account environment. Account A has a production application that is hosted on an Amazon EC2 instance. The application needs to query data in an Amazon DynamoDB table that is hosted in Account B.

A SysOps administrator needs to provide the EC2 instance in Account A with access to the DynamoDB table in Account B.

What is the MOST secure solution that will meet these requirements?

  • A. Update the IAM policy that is attached to the EC2 instance's IAM role to allow the dynamodb:Query permission on the DynamoDB table in Account B. Add a policy in Account A to allow the DynamoDB service principal to use the PassRole action to pass the role to Account B.
  • B. In Account B, create an IAM role that has permission to query the DynamoDB table. Add the EC2 instance's IAM role to the trust policy on the newly created IAM role in Account Update the IAM policy that is attached to the EC2 instance's IAM role to allow the sts:AssumeRole permission on the newly created IAM role in Account B.
  • C. Update the IAM policy that is attached to the EC2 instance's IAM role to allow the dynamodb:Query permission on the DynamoDB table in Account B. Update the DynamoDB table's resource policy to allow the query action from the EC2 instance's IAM role.
  • D. In Account B, create a static IAM key that has the appropriate permissions to query the DynamoDB table. Embed these credentials into the credentials file on the EC2 instance. Reference the credentials every time the application needs to query the table.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Salah94
2 weeks, 3 days ago
Selected Answer: C
Now DyanmoDB supports resource based policy and hence C is the correct answer https://aws.amazon.com/blogs/database/simplify-cross-account-access-control-with-amazon-dynamodb-using-resource-based-policies/
upvoted 1 times
...
r2c3po
7 months, 1 week ago
Selected Answer: B
This option follows the best practice of using IAM roles and cross-account roles for secure access between AWS accounts. By creating an IAM role in Account B with the necessary permissions to query the DynamoDB table and adding the EC2 instance's IAM role to the trust policy of the newly created role, you establish a secure cross-account access mechanism. The EC2 instance can then assume the role in Account B and access the DynamoDB table securely.
upvoted 4 times
...
AWSdeveloper08
11 months, 2 weeks ago
Selected Answer: B
Option B describes the most secure solution for granting the EC2 instance in Account A access to the DynamoDB table in Account B:
upvoted 2 times
...
xSohox
11 months, 2 weeks ago
Selected Answer: B
Looks like correct answer is B. Here is an example with lambda: https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/configure-cross-account-access-to-amazon-dynamodb.html And I couldn't find resource policy on dynamoDB.
upvoted 2 times
...
Tapkar
11 months, 2 weeks ago
Answer is B. According to https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/configure-cross-account-access-to-amazon-dynamodb.html You should create a role in account B that has permission to query the DynamoDB table. For Select trusted entity, choose account A. Then create a policy in account A to access Account B.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago