You know the scene. A new microservice goes live, and someone has to figure out where the database credentials actually live. Everyone swears they properly set up AWS Secrets Manager and Pulumi, yet here you are grepping through CI logs like a digital archaeologist.
The good news: AWS Secrets Manager and Pulumi were practically made for each other. AWS Secrets Manager stores confidential values — database passwords, API keys, tokens — inside encrypted vaults managed by AWS IAM. Pulumi uses real programming languages to define your infrastructure, not another pile of YAML. When they sync, secrets flow safely through declarative infrastructure code instead of leaking through environment files or chat messages.
Here’s the logic. Pulumi accesses AWS Secrets Manager by invoking the AWS SDK with proper IAM permissions, generating secret references at deployment time. That means no hard-coded credentials, no manual rotations, and no local files pretending to be secure. You define secrets once, version them in the Pulumi stack, and AWS Secrets Manager keeps them fresh behind its encryption and rotation policy.
Most issues engineers run into are permission alignment. Map your AWS IAM roles carefully. The Pulumi service account should have read-only access to specific secrets, not blanket permissions for the entire vault. Apply least privilege like your job depends on it. Rotate keys automatically, and make sure audit trail logging is enabled. If you use Okta or an OIDC identity provider, link roles directly so developers don’t bypass security workflows.
Why this setup matters
Proper integration between AWS Secrets Manager and Pulumi gives you reproducible, secure deployments with almost zero manual intervention. Together they eliminate old credential-sharing habits and reduce the chance of brittle pipelines.