ExitAWS Secrets Manager: controlled secret retrieval1 / 9
Explanation

Follow the retrieval request, not the secret value

How build and deployment identities retrieve selected secret versions through identity policies, resource policies, and KMS permissions without exposing secret values. · advanced

A build or deployment job retrieves a secret using its execution identity, not the identity of the person who started the pipeline. Here, a CodeBuild job calls GetSecretValue with its service-role credentials. The diagram shows the request and audit paths; response traffic is omitted.

Secrets Manager selects the version and decrypts the stored secret using envelope encryption. It calls AWS KMS to decrypt the encrypted data key on the caller's behalf. AWS CloudHSM exposes HSM operations; it is not the KMS Decrypt API used by this path.

CloudTrail records retrieval API metadata, not the returned secret value. It is an audit destination, not a store from which the job retrieves secret versions. The authorized job still receives plaintext, so access control and safe handling are separate responsibilities.

AWSCURRENT requestScoped DecryptAPI metadata
AWS CodeBuildBuild or deployment job using its service role
AWS Secrets ManagerSelected secret version and resource policy
AWS Key Management Service (AWS KMS)Customer managed key
AWS CloudTrailRetrieval audit metadata

1 / 5 The CodeBuild job uses temporary credentials for its service role. A deployment script running in this job uses that same identity unless it explicitly assumes another role.

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.