To conduct the infrastructure deployment, we will use the AWS CloudFormation service through the AWS Console or AWS CLI.
Download the template below:
The exercise will be set at us-east-1 (North Virginia).
Create Stack button.Specify template page, we have 2 ways:Amazon S3 URL box. (This template is outdated, please use method 2 for practice)Upload a template file button.
Specify Stack Details page, name it FCAJ-Lab96-SecretsManager and select the Next button.Configure stack options page, proceed to accept (Acknowledge) to allow the Template to create IAM roles, and finally select the Next button.Review and create page, click Submit.
The above process will take 5-10 minutes until we see the status of the Stack as CREATE_COMPLETE.
The values below have been defined as default values at Template.
| Ingredients | Value (Required) |
|---|---|
| NamePrefix | smdemo |
| ProjectTag | smproj |
| DBName | smdemo |
| DBPort | 3306 |
| AmazonLinux2AmiId | /aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2 |
After the CloudFormation Stack has been prepared, we proceed to note all the values in the Outputs section.
The following Output Keys will be used:
| Output Key | Definition |
|---|---|
| BastionIP | IP Address of Bastion Host |
| DBInstance | ID of RDS Instance |
| DBUser | Master User of RDS database |
| DBPassword | Master User’s Password of RDS database |
| EC2UserPassword | Password of ec2-user |
| ECRRepository | ECR repository |
| ECSCluster | ECS cluster |

We need to note and note the above values because they will be used for the next sections.