AWS CDK: How to pass secrets into a Fargate Container

Step 1: Create an Secrets Manager secret:

  1. Open the Secrets Manager console.
  2. Choose Store a new secret.
  3. For Select secret type, choose Other type of secrets.
  4. For Specify the key/value pairs to be stored in this secret, choose the key/value tab

Step 2: Import the secret into your CDK Project

Step 3: Reference the secret in your Amazon Fargate Task Definition

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
The Code Refinery

The Code Refinery

Trying to write 10 lines of code without searching it on google