Skip to content

Commit

Permalink
updates to the dynamic reference lab templates \ module (#195)
Browse files Browse the repository at this point in the history
* updates to the dynamic reference lab templates

* Bump version: 2.4.1 → 2.4.2

* Update content/intermediate/templates/dynamic-references/index.md

---------

Co-authored-by: Matteo Rinaudo <52245107+mrinaudo-aws@users.noreply.github.com>
  • Loading branch information
dkovvuri and mrinaudo-aws committed Apr 3, 2023
1 parent f108bd2 commit d3c501d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[bumpversion]
current_version = 2.4.1
current_version = 2.4.2
commit = True
tag = False
1 change: 1 addition & 0 deletions code/solutions/dynamic-references/database.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Parameters:

Resources:
Database:
DeletionPolicy: Delete
Type: AWS::RDS::DBInstance
Metadata:
cfn_nag:
Expand Down
1 change: 1 addition & 0 deletions code/workspace/dynamic-references/database.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Parameters:

Resources:
Database:
DeletionPolicy: Delete
Type: AWS::RDS::DBInstance
Metadata:
cfn_nag:
Expand Down
5 changes: 3 additions & 2 deletions content/intermediate/templates/dynamic-references/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ In this lab, you will create a Parameter Store parameter to persist an AMI ID: i

Let’s get started! Choose to follow steps shown next:

1. Navigate to the Amazon EC2 [Console](https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#LaunchInstanceWizard:), and [choose the Region](https://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/select-region.html) you wish to use. Next, locate the latest *Amazon Linux 2 AMI, (64-bit x86)*, and note the AMI ID (e.g., `ami-abcd1234`). You will use this value in the next step.
1. Navigate to the Amazon EC2 [Console](https://us-east-1.console.aws.amazon.com/ec2/home?region=us-east-1#LaunchInstances:), and [choose the Region](https://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/select-region.html) you wish to use. Next, locate the latest *Amazon Linux 2 AMI, (64-bit x86)*, and note the AMI ID (e.g., `ami-abcd1234`). You will use this value in the next step.

![ec2](/static/intermediate/templates/dynamic-references/ec2-console-ami-picker.png)

Expand Down Expand Up @@ -97,7 +97,7 @@ Let’s get started! Choose to follow steps shown next:
1. Make sure you are in the `code/workspace/dynamic-references` directory.
2. Open the `database.yaml` CloudFormation template in your favorite text editor.
3. Note the following resources in the template:
1. the resource of type `AWS::RDS::DBInstance`, with which you describe your Amazon RDS instance;
1. the resource of type `AWS::RDS::DBInstance`, with which you describe your Amazon RDS instance. **Note:** for resources of the type `AWS::RDS::DBInstance` that don't specify the `DBClusterIdentifier` property (as in the example for this lab), if a [deletion policy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html) is not explicitly defined, the deletion policy defaults to `Snapshot`, and CloudFormation creates a snapshot for the resource before deleting it. In this lab, `DeletionPolicy` for the resource is set to `Delete` to skip snapshot creation on delete.
2. the resource of type `AWS::SecretsManager::Secret`, where you will store database connection parameters, as JSON key-value pairs, in a secret named `DatabaseConnParams`:
```json
{
Expand All @@ -119,6 +119,7 @@ Let’s get started! Choose to follow steps shown next:
9. On the **Review** page for your stack, scroll down to the bottom, and choose **Create stack**.
10. You can view the progress of stack being created in the CloudFormation Console, by refreshing the stack creation page.
11. Refresh the page until you see the `CREATE_COMPLETE` status for your stack.

3. Next, you will create an AWS Lambda Function, and read a number of database connection parameters as [Environment Variables](https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html) to your Lambda function, by using dynamic references to the Secrets Manager secret you created earlier.
1. Make sure you are in the `code/workspace/dynamic-references` directory.
2. Open the `lambda-function.yaml` CloudFormation template in your favorite text editor.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d3c501d

Please sign in to comment.