A developer is configuring an AWS Lambda function that needs to retrieve files from an Amazon S3 bucket. Which two IAM configurations are required to allow the Lambda function to assume its execution role and read the objects from the bucket? (Select TWO.)
- A trust policy on the IAM role that grants the "sts:AssumeRole" action to the "lambda.amazonaws.com" service principal.Cevap
- An IAM permissions policy attached to the IAM role that grants the "s3:GetObject" action on the target S3 bucket resource.Cevap
- CA trust policy on the IAM role that grants the "sts:AssumeRole" action to the "s3.amazonaws.com" service principal.
- DHardcoded IAM user credentials embedded within the Lambda function code to initialize the S3 SDK client.
- EAn IAM permissions policy attached to the IAM role that allows the "sts:AssumeRole" action on the S3 bucket resource.
Cevap
The correct configurations are: a trust policy on the IAM role that grants the "sts:AssumeRole" action to the Lambda service principal, and an IAM permissions policy attached to the IAM role that grants the "s3:GetObject" action on the target S3 bucket.
The correct options state that a trust policy must grant the "sts:AssumeRole" action to the Lambda service principal, and that a permissions policy must grant the "s3:GetObject" action on the target S3 bucket. Together, these allow the Lambda service to assume the execution role and grant that role the specific permissions needed to retrieve S3 objects.
Adım Adım Çözüm
Anahtar Kavram
IAM execution roles require a trust policy to define the assuming principal (who) and permissions policies to define the allowed actions and resources (what).
Tahmini Süre:1m 0s