AWS Networking Essentials
Part 2 Lab Instructions- Creating a vpc in the cloud
Create A Keypair in the AWS console
1. Creating and configuring VPC
2. Launch an instances in our custom VPC
Step 2: Create a Security Group
Add an inbound security group rule for http traffic over port 80, ssh over port 22 and https when creating the security group
Step 3: Launch an Instance into Your VPC Choose the new vpc we created in part 1 of the lab, add the script below in the user data field, select the security group we created above, select the keypair we created above.
Select an 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
Step 4: Assign an Elastic IP Address to Your Instance - create an elastic ip and assign to the instance
Step 5: Test the link: modify this url with your public dns information for your instance and paste it into a browser window http://my.public.dns.amazonaws.com/phpinfo.php
Step 6: Clean Up - Clean up will be done at the end of class
Part 3 Lab Instructions -Elastic Load Balancing
1. Creating, configuring and testing the ELB- add the instance configured earlier to the elb
- Step 1: Select a Load Balancer Type
- Step 2: Define Your Load Balancer
- Step 3: Assign Security Groups to Your Load Balancer in a VPC
- Step 4: Configure Health Checks for Your EC2 Instances
- Step 5: Register EC2 Instances with Your Load Balancer
- Step 6: Tag Your Load Balancer (Optional)
- Step 7: Create and Verify Your Load Balancer
- Step 8: Delete Your Load Balancer (Optional) - Delete will happen after class
Part 4 Lab Instructions-
1. Setting up autoscaling in a load balanced environment
At the end of class Delete your autoscaling infrastructure
Part 7 Lab Instructions
1. From the IAM console create password policy and create a group, user
2. Create a NACL
- Creating a Network ACL
- Adding and Deleting Rules
- Associating a Subnet with a Network ACL
- Disassociating a Network ACL from a Subnet
- Changing a Subnet's Network ACL
- Deleting a Network ACL - We will delete at the end of class
3. Create a Security Group
- Creating A Security Group
- Adding Group Rules
- Deleting Security Groups - we will delete at the end of class
Part 8 lab-Troubleshooting
1. update ping path in elb
2. security group rules
Clean up activities
Clean Up Tasks Document
Delete all autoscaling groups
Delete or stop any ec2 instances you dont intend to keep
Delete or stop and rds instances you dont 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
Optional: Create a Billing Alarm
Enable Billing Alerts
Create A Billing Alarm
Optional Lab: API Gateway
Lab 1. API Gateway Demo