AWS Architecting
Implementing_Cloud_Design_Patterns_for_AWS
Part 2 Lab Instructions- Snapshot Pattern, Stamp Pattern, Scale Out Pattern
- Launch an instance first (remember to check the box for free tier)
- Create a Amazon linux 2, free tier instance and pass the following in user data field:
#!/bin/bash
yum update -y
amazon-linux-extras install -y lamp-mariadb10.2-php7.2 php7.2
yum install -y httpd mariadb-server
systemctl start httpd
systemctl enable httpd
usermod -a -G apache ec2-user
chown -R ec2-user:apache /var/www
chmod 2775 /var/www
find /var/www -type d -exec chmod 2775 {} \;
find /var/www -type f -exec chmod 0664 {} \;
echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php
2. Add an inbound security group rule for http traffic over port 80 when creating the instance
3. Test the link modify the url with your public dns information for your instance http://my.public.dns.amazonaws.com/phpinfo.php
-
Snapshot Pattern- To create a snapshot using the console
-
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
-
Choose Snapshots under Elastic Block Store in the navigation pane.
-
Choose Create Snapshot.
-
For Select resource type, choose Volume.
-
For Volume, select the volume.
-
(Optional) Enter a description for the snapshot.
-
(Optional) Choose Add Tag to add tags to your snapshot. For each tag, provide a tag key and a tag value.
-
Choose Create Snapshot.
-
- Stamp Pattern- Create an AMI from an EC2 instance
- Scale Out Pattern- Set up Autoscaling:
- Navigate to the EC2 menu and select AutoScaling Groups towards the end of the page
- Click the blue "create auto scaling group" button from the top of the autoscaling group page
- After going through the wizard to create a launch template Create an autoscaling group with these instructions
- Verify your autoscaling group
- At the end of class Delete your autoscaling infrastructure
Create a classic load balancer first
Part 4 Lab Instructions- Section 4 lab instructions
Section 4 CDN Jpeg and Sample Index.html and style sheet file For Static Website
Files For Static Website and CDN
Part 7 Lab Instructions- Database Read Replica Pattern, In Memory Caching Pattern
Lab 1 - Read Replica Pattern
- First Create A RDS Database- check the box for free tier only
2. Creating a database read replica-mysql
Lab 2 In Memory Caching Pattern- Setting Up Elasticache instructions here: Elasticache Instructions
- Create A VPC First If You Dont Already Have One
- Create A Subnet Group
- Launch an Elasticache Cluster
- Delete Your Cluster
Part 8 Lab Instructions- Queuing Chain Pattern
Part 9 Lab Instructions- Monitoring and Notification (SNS)
Setup a notification list
Set up cloud watch alerts and alarms
Part 10 Lab Instructions- Functional Firewall Pattern
Clean Up Tasks:
- Delete all auto scaling and launch configuration groups
- Delete or stop any ec2 instances you don't intend to keep
- Delete or stop any rds instances and read replicas you don't intend to keep
- Delete your keypair off of your desktop, email it to yourself and keep it in a safe place
- Delete your load balancer if you do not intend to keep it
- Delete your S3 bucket and files
- Delete Your CloudFront CDN
- Delete Your Elasticache Cluster
- Delete SQS queues
- Delete SNS Topics
- Delete any security groups you don't want to keep
Exam Prep Guide: