AWS Certified Developer Associate DVA-C02 Practice Question
An application running on an EC2 instance needs to securely interact with various cloud resources. To follow best security practices, you've assigned a particular role to the instance to facilitate this. Which method should your application use to authenticate service requests seamlessly?
Embed a fixed set of security credentials within the application's source code to authenticate service requests.
Rely on the cloud SDK's default behavior to retrieve temporary security credentials provided through the instance's metadata.
Generate and use a dedicated set of long-term security credentials, storing them in the instance storage for service requests.
Implement a custom script to fetch temporary security tokens using GetSessionToken for service request authorization.
When an EC2 instance is launched with an assigned role, temporary security credentials are provided automatically through the Instance Metadata Service (IMDS). AWS SDKs and the AWS CLI automatically retrieve these credentials, allowing the application to make secure requests to other AWS services without explicit credential management. Manually invoking GetSessionToken is unnecessary because the instance-profile credentials already provide temporary tokens. Storing long-term keys on the instance or embedding them in code is insecure and violates AWS best-practice guidance.
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 Instance Metadata Service (IMDS)?
Open an interactive chat with Bash
What are temporary security credentials and why are they preferable to long-term ones?
Open an interactive chat with Bash
How do AWS SDKs automatically retrieve credentials from an EC2 instance role?
Open an interactive chat with Bash
AWS Certified Developer Associate DVA-C02
Security
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 .