The first step for deploying this solution is to create a dummy configuration placeholder and store it into AWS Secrets Manager. For the time-being, this is just a placeholder and we will come back and update this later.
NOTE (Very Important!): In the src/js directory of this project, there is a file called sm-key.txt
. This file is used by the Lambda@Edge function to determine which AWS Secrets Manager secret to pull the configurations from. It is very important that this name matches the name you give the Secret in step 7 of these instructions. For example, if you name your placeholder secret my-cloudfront-secret
, the sm-key.txt
file must also contain a string called my-cloudfront-secret
.
- Navigate to the AWS Console
- Search for
Secrets Manager
and click on this service - Click on
Store a new secret
- For the
Secret type
selectOther type of secret
- In the
Key/value pairs
section, provide the following details:Key
= configValue
= PLACEHOLDER
6. Select the appropriate Encryption key
settings for your organization's needs. The default is to use the aws/secretsmanager
key.
7. Provide the Secret name
- which is "cloudfront/DISTRIBUTION_ID", along with an appropriate Description
and a set of Tags
that make it easy to identify the Secret. For now, you can skip Resource permissions
- you will come back to this later.
- Click on the
Next
button. - Provide the
Secret rotation
settings or leave it as the default. - Click on
Next
. - Click
Store
. - Click on the Secret that was just created.
- Under the
Secret details
section, copy theSecret ARN
and save this to a notepad for later use. - Move on to the next step!
Navigate to Deploy the AWS SAM Stack for the next step.