Use Amazon Secrets Manager to track database passwords or third-party API keys - Amazon CodePipeline
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Use Amazon Secrets Manager to track database passwords or third-party API keys

We recommend that you use Amazon Secrets Manager to rotate, manage, and retrieve database credentials, API keys, and other secrets throughout their lifecycle. Secrets Manager enables you to replace hardcoded credentials in your code (including passwords) with an API call to Secrets Manager to retrieve the secret programmatically. For more information, see What Is Amazon Secrets Manager? in the Amazon Secrets Manager User Guide.

For pipelines where you pass parameters that are secrets (such as OAuth credentials) in an Amazon CloudFormation template, you should include dynamic references in your template that access the secrets you have stored in Secrets Manager. For the reference ID pattern and examples, see Secrets Manager Secrets in the Amazon CloudFormation User Guide. For an example that uses dynamic references in a template snippet for GitHub webhook in a pipeline, see Webhook Resource Configuration.

The following related resources can help you as you work with managing secrets.