AWS Certified Data Engineer Associate DEA-C01 Practice Question
A data engineering team is deploying an AWS Lambda function that copies objects from an Amazon S3 ingestion bucket into an Amazon Redshift cluster each hour. The function must authenticate to Redshift by retrieving a password stored in AWS Secrets Manager. Following the principle of least privilege, which actions will allow the function to obtain the secret at runtime?
Create a dedicated IAM role for the function with a policy that allows only secretsmanager:GetSecretValue on the specific secret ARN, then assign the role as the function's execution role.
Attach a resource-based policy to the secret granting the Lambda service principal secretsmanager:GetSecretValue and leave the function's execution role unchanged.
Attach the AWS managed SecretsManagerReadWrite policy to the function's execution role to grant all Secrets Manager actions.
Store the secret ARN and password as encrypted environment variables and give the role kms:Decrypt permission on the default AWS managed KMS key.
A Lambda function authenticates to AWS services through its execution role. Granting that role only the secretsmanager:GetSecretValue action on the specific secret ARN lets the function read the password without permitting any other Secrets Manager or AWS operations, satisfying least-privilege. Using the broad SecretsManagerReadWrite managed policy gives unnecessary create, update, and list powers; encrypted environment variables still expose static credentials; and adding a resource-based policy that trusts the Lambda service principal does not supply the function's identity with the required API permission, so the call would be denied.
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 AWS Secrets Manager?
Open an interactive chat with Bash
What does 'principle of least privilege' mean in AWS?
Open an interactive chat with Bash
Why use an IAM role for AWS Lambda functions?
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 .