A service running under an IAM role must call Amazon Bedrock through an HTTP client that supports only bearer-token authentication. Security requires credentials that expire within hours and carry no permissions beyond the role's. Which credential should the service use?
Show the answer
Correct answerB. A short-term Bedrock API key generated from the role's credentials
AWhy not this: A long-term key lasts days, not hours, and is tied to a separate IAM user rather than the service's role.
BWhy this is right: A short-term key is a bearer token that expires within 12 hours and carries only the generating role's permissions.
CWhy not this: IAM user access keys are long-lived and need Signature Version 4 signing, which this client cannot do.
DWhy not this: Role credentials meet the expiry rule, but this client cannot sign requests with Signature Version 4.
A short-term Bedrock API key lasts up to 12 hours (or the session, if shorter), inherits the permissions of the IAM principal that generated it, and is the type AWS recommends for production; the token generator library can renew it before it expires. A long-term key creates an IAM user and is meant only for exploration.