exam questions

Exam AWS Certified Developer Associate All Questions

View all questions & answers for the AWS Certified Developer Associate exam

Exam AWS Certified Developer Associate topic 1 question 20 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 20
Topic #: 1
[All AWS Certified Developer Associate Questions]

A development team has been using a builder server that is hosted on an Amazon EC2 instance to perform builds and deployments for the last 3 months. The
EC2 instance's instance profile uses an IAM role that contains the Administrator Access managed policy. The development team must replace that policy with a policy that provides only the required permissions.
What is the FASTEST way to create a custom 1AM policy for the EC2 instance to meet this requirement?

  • A. Create a new IAM policy based on services that the build server deployed or updated in the last 3 months.
  • B. Create a new IAM policy that includes all actions that AWS CloudTrail recorded for the IAM role in the last 3 months.
  • C. Create a new permissions boundary policy that denies all access. Associate the permissions boundaries with the IAM role.
  • D. Create a new IAM policy by using Amazon Athena to query an Amazon S3 bucket that contains AWS CloudTrail events that the IAM role performed in the last 3 months.
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
gary_gary
Highly Voted 2 years, 7 months ago
Selected Answer: B
"As an administrator or developer, you might grant permissions to IAM entities (users or roles) beyond what they require. IAM provides several options to help you refine the permissions that you grant. One option is to generate an IAM policy that is based on access activity for an entity. IAM Access Analyzer reviews your AWS CloudTrail logs and generates a policy template that contains the permissions that the entity used in your specified date range. You can use the template to create a policy with fine-grained permissions that grant only the permissions that are required to support your specific use case." https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_generate-policy.html
upvoted 25 times
...
JOL86
Highly Voted 2 years, 7 months ago
I'm not sure between A and B. While it doesn't specify, another service (EC2 instance) could be sharing that role and CloudTrail would show actions from that other service using this IAM role as well. I am leaning towards A, just because the answer of B is "includes all actions", sounds like there would be more actions than required
upvoted 16 times
qiaoli
2 years, 1 month ago
The "all actions" in B are all necessary, because they come from the cloud trail log. A is not clear about the actions of a service.
upvoted 1 times
aktharrr
1 year, 7 months ago
all actions in B are not necessary, since an IAM role can be attached with different instances this may provide over permission for this particular instance
upvoted 2 times
...
...
...
sumanshu
Most Recent 4 months, 1 week ago
Selected Answer: B
A) Eliminated: This is not fast because it requires you to manually determine which services were involved in deployments over the last 3 months
upvoted 2 times
sumanshu
4 months, 1 week ago
D) Eliminated: Complex option
upvoted 2 times
sumanshu
4 months, 1 week ago
B) Correct : It is the fastest and most efficient approach, as it directly leverages CloudTrail to audit and determine the specific permissions needed
upvoted 2 times
sumanshu
4 months, 1 week ago
C: Eliminated - because a permissions boundary essentially restricts the maximum allowed permissions for an IAM role or user, but it doesn't actually grant any specific permissions
upvoted 2 times
...
...
...
...
thucta96dn
5 months, 4 weeks ago
Selected Answer: D
I think D
upvoted 1 times
...
Sty01
8 months, 2 weeks ago
I think it is A. https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_generate-policy.html
upvoted 1 times
...
AsmaZoheb
1 year, 3 months ago
Selected Answer: A
i think so A
upvoted 1 times
...
rcaliandro
1 year, 10 months ago
I think is B
upvoted 1 times
...
Rpod
2 years ago
Selected Answer: D
The Keyword fastest is very confusing if B is the answer because its fast . B is faster than D as in we need to build a soltuion using S3 and Athena but you still have to go through 3 months logs manually to see what all has been accessed , however if we build a solution on S3 and Athena the solution comes out in couple of minutes via a simple query . So which one is really fast ?
upvoted 1 times
MalayShah
1 year, 9 months ago
As D would have been faster than B if in CloudTrail, trail would already have been created to push logs to S3, which is not mention in question anywhere. When you create a CloudTrail trail to push logs to S3 it wont push the previous logs. By default it wont push to S3. Reference: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-getting-started.html
upvoted 2 times
...
...
MrTee
2 years ago
Selected Answer: B
The fastest way to create a custom IAM policy for the EC2 instance to meet this requirement is B. Create a new IAM policy that includes all actions that AWS CloudTrail recorded for the IAM role in the last 3 months. This approach allows you to quickly identify the actions that were actually used by the build server and create a policy that provides only the required permissions.
upvoted 1 times
...
captainpike
2 years, 1 month ago
The safest would be to do what "A" says to do + collect the minumum access for each of the services. However, the question says FASTEST which makes option B to be the answer. Mind that if some undue access was done in the past 3 months, the permission will still persist, violating the principle of least access privilege
upvoted 2 times
...
may2021_r
2 years, 2 months ago
A. Create a new IAM policy based on services that the build server deployed or updated in the last 3 months. The fastest way to create a custom IAM policy for the EC2 instance to meet the requirement would be to create a new IAM policy based on the services that the build server deployed or updated in the last 3 months. This information should be readily available and can be used to determine the specific actions and resources that the build server requires access to. Once this information has been gathered, you can create a new IAM policy that grants only the necessary permissions to the EC2 instance's IAM role. This approach is faster than the other options because it requires only a review of the build server's recent activity, rather than a more complex analysis of AWS CloudTrail logs.
upvoted 3 times
...
Krt5894
2 years, 2 months ago
Selected Answer: B
https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_generate-policy.html
upvoted 2 times
...
vavat38102
2 years, 2 months ago
B is the answer, my logic: A.Create a new IAM policy based on services that the build server deployed or updated in the last 3 months. - Services isn’t very specific, there are multiple different IAM actions that can be performed on each service. Additionally there is no method to achieve what is required. B. Create a new IAM policy that includes all actions that AWS CloudTrail recorded for the IAM role in the last 3 months. - Cloudtrail will record these requests. Cloudtrail has 90 day retention by default, so this is an accurate answer. C. Create a new permissions boundary policy that denies all access. Associate the permissions boundaries with the IAM role. - IAM permissions boundaries have no relevance here, permissions boundaries don’t grant access. D. Create a new IAM policy by using Amazon Athena to query an Amazon S3 bucket that contains AWS CloudTrail events that the IAM role performed in the last 3 months - This is a the best architected solution, but the question is FASTEST, and this is not the fastest method.
upvoted 2 times
...
gaddour_med
2 years, 3 months ago
D talk about events not actions
upvoted 1 times
...
humble_developer
2 years, 4 months ago
Selected Answer: A
Should be A. Digging through CloudTrail log to find out all action does not sound fast enough for me. Again, the question mentioned the Intance role that EC2 using is for Admin, and this could includes more than enough action that will be included in the CloudTrail Log. Besides, the answer A bounds only resouces that was actually used from the team.
upvoted 3 times
...
SBoksh
2 years, 4 months ago
Selected Answer: B
Access analyzer reviews cloudtrail logs and generate a template policy that can be further refined to restrict access
upvoted 1 times
...
cloud_collector
2 years, 5 months ago
Selected Answer: B
The question is asking a way to create a policy with meet the requirement. Using Athena with CloudTrail logs is a powerful way to enhance your analysis of AWS service activity. But in here , no metioned to ask a good analysis tools or way for the logs. https://docs.aws.amazon.com/athena/latest/ug/cloudtrail-logs.html
upvoted 1 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