
Answer-first summary for fast verification
Answer: Establish an IAM execution role with necessary permissions and associate it with the Lambda function.
The correct answer is D: Establish an IAM execution role with necessary permissions and associate it with the Lambda function. When using AWS Lambda functions, it is a best practice to create an IAM execution role with the required permissions and attach it to the Lambda function. This approach allows the Lambda function to perform actions on other AWS services securely and efficiently. Adding required IAM permissions in the resource policy of the Lambda function (Option A) would not directly grant execution permissions to the function. Options B and C are not recommended as they involve using static credentials, which is less secure compared to using IAM roles.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
How should a solutions architect grant the necessary permissions for an AWS Lambda function to upload files to Amazon S3, given that the developer has an existing IAM user with valid credentials?
A
Modify the Lambda function's resource policy to include the required IAM permissions.
B
Generate a signed request within the Lambda function using the IAM user's existing credentials.
C
Create a new IAM user and assign the existing IAM credentials for use in the Lambda function.
D
Establish an IAM execution role with necessary permissions and associate it with the Lambda function.
No comments yet.