AWS Certified Data Engineer Associate DEA-C01 Practice Question
A CloudFormation template will deploy an AWS Glue job that runs in a private subnet. The job only needs to read objects from the S3 bucket named analytics-data. Security insists the template: 1) follows the principle of least privilege and 2) keeps the IAM role definition concise by avoiding a long inline policy block within the role. Which CloudFormation approach best meets these requirements?
Define an AWSIAMRole and attach the AWS-managed policy AmazonS3ReadOnlyAccess in the ManagedPolicyArns property.
Create an AWSIAMManagedPolicy resource granting s3:GetObject on arn:aws:s3:::analytics-data/* and reference it in the role's ManagedPolicyArns property.
Add an AWSIAMPolicy inline resource that grants s3:GetObject on the bucket and attach it to the role.
Attach an AWSIAMInstanceProfile to the Glue job so it inherits the default EC2 instance role.
Using an AWSIAMManagedPolicy resource lets you define a separate, reusable policy document that can be limited to the specific S3 bucket. Attaching that managed policy to the role through the ManagedPolicyArns property keeps the role resource small while still granting only s3:GetObject permission on the required bucket, satisfying least-privilege. Relying on the AWS-managed AmazonS3ReadOnlyAccess policy would grant read access to every bucket, which violates least-privilege. An AWSIAMPolicy inline resource or an inline Policies block within the role would work, but they place the entire JSON policy in the role definition, contradicting the requirement to avoid a large inline block. An instance profile is used for EC2 resources and would not attach permissions to an AWS Glue job.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the principle of least privilege in AWS IAM?
Open an interactive chat with Bash
Why is an AWS::IAM::ManagedPolicy used instead of an inline policy?
Open an interactive chat with Bash
What permissions does AmazonS3ReadOnlyAccess include, and why is it unsuitable here?
Open an interactive chat with Bash
AWS Certified Data Engineer Associate DEA-C01
Data Security and Governance
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .