Security

How should an AWS Lambda function obtain temporary AWS credentials to call Amazon Bedrock?

Show the answer

Correct answerB. Use its Lambda execution role.

AWhy not this: A guardrail identifier selects filtering controls; it does not provide AWS credentials.

BWhy this is right: Lambda assumes the execution role and provides temporary credentials to the function.

CWhy not this: IAM user access keys are long-term credentials, not the function's temporary role credentials.

DWhy not this: A VPC endpoint identifier identifies a network endpoint, not an AWS identity or credentials.

Lambda provides temporary credentials for the function's execution role. IAM user access keys are long-term credentials and should not be embedded in the function.