AWS Certified Data Engineer Associate DEA-C01 Practice Question
An EC2 instance in a private subnet runs AWS CLI scripts every 5 minutes to load IoT sensor data into Amazon S3. Security policy forbids storing long-lived IAM user credentials on the instance. Which solution enables the scripts to authenticate with AWS while complying with the policy and AWS best practices?
Run aws configure sso once a week and rely on cached AWS IAM Identity Center (SSO) tokens for the nightly scripts.
Attach an IAM role with least-privilege permissions to the instance via an instance profile; the AWS CLI automatically obtains temporary credentials from the Instance Metadata Service.
Use the AWS CLI to generate new access keys for the IAM role at the start of each run and delete them when the load completes.
Create an IAM user, encrypt its access key with AWS KMS, store the key on the instance, and decrypt it at runtime before each CLI call.
Attaching an IAM role to the EC2 instance through an instance profile provides short-lived credentials automatically through the Instance Metadata Service. The AWS CLI picks up these rotating credentials without additional configuration, eliminating the need to store or rotate long-lived keys on the server. The other options either rely on permanent access keys, require manual interactive authentication, or attempt to create access keys for a role (not supported), so they do not meet the security requirement.
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 an IAM role and how does it differ from an IAM user?
Open an interactive chat with Bash
What is the Instance Metadata Service (IMDS) in AWS?
Open an interactive chat with Bash
Why is attaching an IAM role via an instance profile considered a best practice?
Open an interactive chat with Bash
What is the Instance Metadata Service (IMDS)?
Open an interactive chat with Bash
What is an instance profile, and how is it related to an IAM role?
Open an interactive chat with Bash
Why are temporary credentials preferred over long-lived credentials in AWS?
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 .