aws devops
Step1
- Review the practice lab tasks in the Concept section.
- Click Start Lab or Open AWS Console to begin.
- Follow the lab instructions carefully, and use the arrows to navigate between steps.
AWS services not used in this lab are disabled in the lab environment. In addition, the capabilities of the services used in this lab are limited to what the lab requires.
Step 2
- In the top navigation bar search box, type:ec2
- In the search results, under Services, click EC2.
- Go to the next step.
Step3
- In the left navigation pane, click AMI Catalog.
- Go to the next step.
Step4
- In the AMIs search box, type:sql and press Enter.
- On the Quick Start AMIs tab, review the available AMIs on Amazon EC2.
- Depending on your requirements, you can find AMIs provided directly by AWS, through trusted third-parties in the AWS Marketplace, or through the AWS community.
3.Go to the next step.
Step5
In the top navigation bar search box, type:database
In the search results, click Show more.
Go to the next step.
Step6
- Review the list of available database options.
- Click Aurora and RDS.
- Go to the next step.
Step7
- In the left navigation pane, click Databases.
- On the Databases page, click Create database.
- In the pop-up box, choose Full configuration.
- Go to the next step.
Step8
- For Choose a database creation method, choose Full configuration.
- For Engine type, choose MariaDB.
- Go to the next step.
Step9
- For Templates, choose or keep Dev/Test.
- For Engine version, on the dropdown list, keep the provided default MariaDB version.
- The default version in your practice lab might be different from what is displayed in the screenshot example.
- For DB instance identifier, type: my-database
- Except hyphens, no other special characters are supported in the DB instance identifier.
- Go to the next step.
Step10
- Under Credential settings, for Master username, keep the default choice of admin.
- For Credentials management, choose Self managed.
- For Master password, type: ILoveLearning!123
- For Confirm master password, type the password again.
- Go to the next step.
Step11
- In the Instance configuration section, for DB instance class, choose Burstable classes.
- Below that, on the dropdown list, choose db.t3.xlarge.
- Only t3 db classes are supported in this practice lab.
- For Storage type, choose General Purpose SSD (gp3).
- For Allocated storage, type: 20
- Go to the next step.
Step12
- Click to expand Additional storage configuration.
- For Storage autoscaling, keep or choose the default of Enable storage autoscaling.
- For Maximum storage threshold, keep or choose the default of 1000 GiB.
- For Multi-AZ deployment, choose Create a standby instance.
- Go to the next step.
Step13
- For Virtual private cloud (VPC), keep the Default VPC.
- For DB subnet group, keep the default.
- For Public access, keep the default choice of No.
- For VPC security group (firewall), keep the default choice of Choose existing.
- Go to the next step.
Step14
- For Monitoring, choose Database Insights — Standard.
- Clear the checkbox to deselect Collect detailed database and per-query metrics.
- If this feature is enabled, you’ll get a permissions error when you try to create the database.
- Go to the next step.
Step15
- Click to expand Additional monitoring settings.
- For Enhanced Monitoring, clear the checkbox to deselect Enable Enhanced monitoring.
- If this feature is enabled, you’ll get a permissions error when you try to create the database.
- Go to the next step.
Step16
- Click to expand Additional configuration.
- For Initial database name, type:
my_database
- Notice that the database name can be different than the db instance name configured earlier.
- For DB parameter group and Option group, review the default options.
- For Backup, review the default options.
- Go to the next step.
Step17
- For Encryption, review the default encryption options.
- For Maintenance, clear the checkbox to deselect Enable auto minor version upgrade.
- For Maintenance window, keep the default choice of No preference.
- Scroll down to the bottom of the page, and then click Create database (not shown).
- If any pop-up boxes appear (offering add-ons), close them.
- The RDS DB instance takes 5–10 minutes to be created.
- Go to the next step.
Step18
- After the database is created, wait 5–10 additional minutes, and then click the Databases refresh icon.
- After the database is created, the status displays Modifying.
- Under Status, review to confirm that the status is now Available.
- If the status hasn’t changed to Available, continue to click the refresh icon every few minutes until it does.
- Click my-database.
- Go to the next step.
Step19
- In the Summary section, under DB identifier, review the identifier.
- Click Actions to expand the dropdown list.
- Review the different options.
- You must return to these options, such as Create read replica, in the upcoming DIY section of this solution.
- Go to the next step.
Step20
- In the top navigation bar search box, type:
dms
- In the search results, under Services, click Database Migration Service.
- Go to the next step.
Step21
- In the left navigation pane, click Getting started.
- Go to the next step.
Step22
- For How you can use DMS, choose Discover and assess.
- Below that, review the description.
- Repeat for the other option.
- The other option is: “Migrate or replicate”.
- Go to the next step.
Step1
- Review the practice lab tasks in the Concept section.
- Click Start Lab or Open AWS Console to begin.
- Follow the lab instructions carefully, and use the arrows to navigate between steps.
AWS services not used in this lab are disabled in the lab environment. In addition, the capabilities of the services used in this lab are limited to what the lab requires
Step2
- In the top navigation bar search box, type:
dynamodb
- In the search results, under Services, click DynamoDB.
- Go to the next step.
Step3
- In the left navigation pane, click Tables.
- In the Tables section, click Create table.
- Go to the next step.
Step4
- For Table name, type:
UserVideoHistory
- For Partition key, in the left text box, type:
userId
- Keys are case sensitive. You must type the partition key exactly as shown — userId with an uppercase I.
- On the right dropdown list, choose String.
- String is the data type.
- For Sort key, in the left text box, type:
lastDateWatched
- On the right dropdown list, choose Number.
- For Table settings, choose Default settings.
- Scroll down to the bottom of the page, and then click Create table (not shown).
- Go to the next step.
Step5
- For the UserVideoHistory table, under Status, review to confirm that the status is Active.
- If not, wait for the status to change.
- When active, click the table name.
- Go to the next step.
Step6
- Click Actions to expand the dropdown list.
- Choose Create item.
- Go to the next step.
Step7
- For userId, under Value, type:
12345-abcd-6789
- For lastDateWatched, under Value, type:
1740086439
- This is a UNIX timestamp.
- Go to the next step.
Step8
- Click Add new attribute to expand the dropdown list.
- Choose String.
- Go to the next step.
Step9
- For the new attribute, under Attribute name, type:
videoId
- Make sure to type the attribute name exactly, with an uppercase I in Id.
- Under Value, type:
9875-djac-1859
- Go to the next step.
Step10
- Click Add new attribute.
- Choose String.
- Go to the next step.
Step11
- For the new attribute, under Attribute name, type:
preferredLanguage
- Under Value, type:
en-US
- Go to the next step.
Step12
- Click Add new attribute.
- Choose List.
- Go to the next step.
Step13
- For the new attribute, under Attribute name, type:
supportedDeviceTypes
- Go to the next step.
Step14
- Under Value, click Insert a field to expand the menu.
- Choose String.
- Go to the next step.
Step15
- In the new text box, type:
Amazon Fire TV
- Click Insert a field.
- Choose String.
- Go to the next step.
Step16
- In the new text box, type:
Amazon Fire Tablet
- Click Create item.
- Go to the next step.
Step17
- In the Items returned section, under userId, click 12345-abcd-6789.
- You can now edit the record again.
- Go to the next step.
Step18
- Click Add new attribute.
- Choose Number.
- Go to the next step.
Step19
- For the new attribute, under Attribute name, type:
lastStopTime
- Under Value, type: 90
- The lastStopTime attribute stores video viewing duration in seconds (as a Number type). You can use this value to implement video resume functionality.
- Click Save and close.
- Go to the next step.
Step20
- Click to expand Scan or query items.
- Choose Query.
- For userId (Partition key), type:
12345-abcd-6789
- For lastDateWatched (Sort Key), choose Greater than.
- Next to that, in the text box, type:
1740086438
- Click Run.
- Go to the next step.
Step21
- In the Items returned section, review the returned record.
- Go to the next step.
Step22
- To change the query criteria, for userId, type:
abd5-zxcg-12385
- Click Run.
- In the Items returned section, review the results.
- Nothing is returned because no record matches the partition key.
- Go to the next step.
Step23
- For Scan or query items, choose Scan.
- Click Run.
- In the Items returned section, review the results.
- All items in your DynamoDB table should be listed.
- Go to the next step.
Step1
- Review the practice lab tasks in the Concept section.
- Click Start Lab or Open AWS Console to begin.
- Follow the lab instructions carefully, and use the arrows to navigate between steps.
AWS services not used in this lab are disabled in the lab environment. In addition, the capabilities of the services used in this lab are limited to what the lab requires.
Step2
- In the top navigation bar search box, type:ec2
- In the search results, under Services, click EC2.
- Go to the next step.
Step3
- In the left navigation pane, click Instances.
- In the Instances section, review the names of the three available instances.
- To review all of the instance details, scroll to the right.
- Go to the next step.
Step4
- Under Availability Zone, review the AZ for each instance.
- In the left navigation pane, under Network & Security, click Security Groups.
- Go to the next step.
Step5
- In the Security Groups section, review the Web_Server_SG security group.
- The webserver security group is already linked to the web servers.
- Click Create security group.
- Go to the next step.
Step6
- For Security group name, type:
PetModels-EFS-1-SG
- For Description, type:
Restrict access to web servers only.
- For VPC, on the dropdown list, choose the PetModels VPC.
- You might need to remove the existing VPC by clicking the X.
- In the Inbound rules section, click Add rule.
- Go to the next step.
Step7
- To configure the new rule, for Type, choose NFS.
- Under Source, click to expand the dropdown list.
- Choose the webserver security group.
- Scroll down to the bottom of the page, and then click Create security group (not shown).
- Go to the next step.
Step8
- Under Security group name, review the name.
- On the Inbound rules tab, review the newly created rule.
- Go to the next step.
Step9
- In the top navigation bar search box, type:fsx
- In the search results, under Services, click FSx.
- Go to the next step.
Step10
- On the Amazon FSx console home page, review the information and descriptions.
- Go to the next step.
Step11
- In the top navigation bar search box, type:
efs
- In the search results, under Services, click EFS.
- Go to the next step.
Step12
- On the Amazon EFS console home page, click Create file system.
- Go to the next step.
Step13
- In the pop-up box, for Name, type:
PetModels-EFS-1
- For Virtual Private Cloud (VPC), choose the PetModels VPC.
- Click Customize.
- Go to the next step.
Step14
- In the File system settings step, for File system type, review the types.
- For Automatic backups, clear the checkbox to deselect Enable automatic backups.
- Go to the next step.
Step15
- Under Lifecycle management, for Transition into Infrequent Access (IA), choose None.
- The Infrequent Access storage class is designed for storing long-lived, infrequently accessed files in a cost-effective manner.
- For Transition into Archive, choose None.
- The Archive storage class is designed for data that is accessed very infrequently — only a few times per year or less.
- Go to the next step.
Step16
- In the Performance settings section, for Throughput mode, choose Bursting.
- Click Next.
- Go to the next step.
Step17
- In the Network access step, under Mount targets, to remove the subnet for AZ us-east-1c, click Remove.
- To remove the subnet for AZ us-east-1b, click Remove.
- To remove the security group for AZ us-east-1a, under Security groups, click the X in the displayed security group.
- Go to the next step.
Step18
- For AZ us-east-1a, under Security group, choose the PetModels-EFS-1-SG security group.
- Click Next.
- Go to the next step.
Step19
- In the File system policy step, click Next.
- Go to the next step.
Step20
- In the Review and create step, at the bottom of the page, click Create.
- Go to the next step.
Step21
- In the success alert, review the message.
- If an iam:CreateServiceLinkedRole error alert appears, you can safely ignore it.
- Under File system ID, review the provided ID.
- You must use this ID in the later DIY section of this solution.
- Click the file system name PetModels-EFS-1.
- Go to the next step.
Step22
- Under File system state, review to confirm that the state is Available.
- If the status is not Available, wait a minute and then refresh the page.
- Click Attach.
- Go to the next step.
Step23
- In the pop-up box, keep the default choice of Mount via DNS.
- Under Using the EFS mount helper, click the copy icon to copy the mount command, and then paste it in the text editor of your choice on your device.
- You use this command in later steps.
- Click Close.
- Go to the next step.
Step24
- Navigate to the Amazon EC2 console.
- Remember you can use the Services search box (or click Services) on the top navigation bar to navigate to a different service console.
- In the left navigation pane, click Instances.
- In the Instances section, choose the checkbox to select WebServer1.
- Click Connect.
- Go to the next step.
Step25
- In the In web browser tab, choose SSM Session Manager.
- Click Connect.
- The Session Manager terminal opens in a new browser tab (or window). Keep the current browser tab open. You return to it.
- Go to the next step.
distributions.
Step26
- In the terminal, at the command prompt, run (type the command and press Enter):
sudo -i
- In the terminal, run:
sudo yum install -y amazon-efs-utils
- You can also copy-paste this text. If you receive an undefined value when you paste this, try again.
- Go to the next step.
Step27
- Review the packages installed from the previous yum command.
- Go to the next step.
Step28
- In this step, you use Linux commands to create a data directory. You then mount the newly created EFS file system to that directory. You create a log file and append information to it. The log file and its contents are visible from other instances that have the same file system mounted.
- In the terminal, run:
mkdir data
- If you receive a Permission Denied error alert, run the following command, and then repeat the previous command:
cd ~/
- In the terminal, paste the sudo mount command that you copied from the Amazon EFS console in an earlier step.
- At the end of the pasted command, to replace the “efs” folder name, type:
data
and press Enter.
- The command should look similar to what is displayed in the screenshot example.
- In the terminal, run:
cd data
- To create a log file, run:
sudo bash -c “cat >> efs-1-setup.log”
- No output is displayed. Instead, the cursor moves to a new line and waits for your next input.
- In the terminal, type:
efs-1 mounted in site A
- To end the cat session, press Ctrl+C on your keyboard.
- To view the log file contents, run:
cat efs-1-setup.log
- Go to the next step.
Step29
- In the other browser tab, navigate to the File systems page on the Amazon EFS console.
- Click the file system name PetModels-EFS-1.
- Go to the next step.
Step30
- On the Network tab, click Manage.
- Go to the next step.
Step31
- Under Mount targets, click Add mount target.
- Go to the next step.
Step32
- For the new mount target, for Availability zone, choose or keep us-east-1b.
- For Subnet ID, choose PetModels-Subnet2.
- Go to the next step.
Step33
- For Security groups, choose PetModels-EFS-1-SG.
- Click Save.
- If the “User is not authorized to perform that action on the specified resource” error alert appears, you can safely ignore it.
- Go to the next step.
Step34
- After a few minutes, in the Network section, click the refresh icon.
- For the new mount target, under Mount target state, review to confirm that the state is Available.
- Wait for the state to change before proceeding.
- Go to the next step.
Step35
- Navigate to the Instances page on the Amazon EC2 console.
- Choose the checkbox to select WebServer2.
- Click Connect.
- Go to the next step.
Step36
- In the In web browser tab, choose SSM Session Manager.
- Click Connect.
- Go to the next step.
Step37
- In the terminal, run:
sudo -i
- In the terminal, run:
sudo yum install -y amazon-efs-utils
- Go to the next step.
Step38
- In this step, you create a data directory, mount your EFS file system to the data directory, and add entries to the existing log file.
- In the terminal, run:
mkdir data
- If you receive a Permission Denied error alert, run the following command, and then repeat the previous command:
cd ~/
- In the terminal, paste the sudo mount command that you copied from the Amazon EFS console in an earlier step.
- At the end of the pasted command, to replace the “efs” folder name, type:
data
and press Enter.
- The command should look similar to what is displayed in the screenshot example.
- In the terminal, run:
cd data
- To create a log file, run:
sudo bash -c “cat >> efs-1-setup.log”
- Again, no output is displayed. The cursor moves to a new line and waits for your next input.
- In the terminal, type:
efs-1 mounted in site B
- To end the cat session, press Ctrl+C on your keyboard.
- Go to the next step.
Step39
- To view the log file contents, run:
cat efs-1-setup.log
- Review the two log entries.
- The changes made in both WebServer1 and WebServer2 are in the efs-1-setup.log file.
- Go to the next step.
Step1
- Review the practice lab objectives in the Concept section.
- Click Start Lab or Open AWS Console to begin.
- Follow the lab instructions carefully, and use the arrows to navigate between steps.
AWS services not used in this lab are disabled in the lab environment. In addition, the capabilities of the services used in this lab are limited to what the lab requires.
Step2
- In the top navigation bar search box, type:ec2
- In the search results, under Services, click EC2.
- Go to the next step.
Step3
- In the left navigation pane, click Instances.
- In the Instances section, review the number of running instances.
- For the Game Server instance, under Instance ID, click the provided ID.
- Go to the next step.
Step4
- Under Public IPv4 address, click the copy icon to copy the provided address.
- Go to the next step.
Step5
- In a new browser tab (or window) address bar, type:
http://
- To complete the URL, next to the protocol (http://), paste the web server public IP address that you just copied and press Enter.
- Switch back to the AWS console browser window or tab (not shown).
- Go to the next step.
Step6
- Click Actions to expand the menu.
- Choose Image and templates.
- Choose Create image.
- Go to the next step.
Step7
- For Image name, type:
GameServer
- For Image description, type:
Game server image
- Scroll down to the Tags section.
- Go to the next step.
Step8
- For Tags, keep the default choice of Tag image and snapshots together.
- Click Create image.
- Go to the next step.
Step9
- In the left navigation pane, under Images, click AMIs.
- In the AMIs section, for the GameServer AMI, under Status, review to confirm that Available is displayed.
- Allow up to 5 minutes for the status to change. Click refresh periodically to check.
- In the left navigation pane, click Launch Templates.
- Go to the next step.
Step10
- On the EC2 launch templates home page, click Create launch template.
- Go to the next step.
Step11
- For Launch template name, type:
GameServerTemplate
- For Template version description, type:
Game server template
- For Auto Scaling guidance, choose the checkbox to select Provide guidance to help me…
- Go to the next step.
Step12
- In the Application and OS Images section, click the My AMIs tab.
- Choose Owned by me.
- For Amazon Machine Image (AMI), on the dropdown list, choose GameServer.
- Go to the next step.
Step13
- For Instance type, choose t3.micro.
- For Key pair name, click Create new key pair.
- Go to the next step.
Step14
- In the pop-up box, for Key pair name, type:
GameServerKeyPair
- For Key pair type, choose RSA.
- For Private key file format, choose .pem.
- Click Create key pair.
- After you are prompted to download it (not shown), save the GameServeKeyPair file to your device.
- Go to the next step.
Step15
- For Firewall (security groups), choose Select existing security group.
- For Security groups, choose WebServerSecurityGroup.
- Go to the next step.
Step16
- At the bottom of page, review the Summary section.
- Click Create launch template.
- Go to the next step.
Step17
- In the success alert, review the message.
- At the bottom of the page, click View launch templates.
- Go to the next step.
Step18
- In the left navigation pane, click Auto Scaling Groups.
- You might need to click the menu icon (three lines) in the left side panel to expand the navigation pane.
- On the Amazon EC2 Auto Scaling home page, click Create Auto Scaling group.
- Go to the next step.
Step19
- In the Choose launch template or configuration step, for Auto Scaling group name, type:
RegularCustomerGameServer
- For Launch template, choose GameServerTemplate.
- Scroll to the bottom of the page, and then click Next (not shown).
- Go to the next step.
Step20
- In the Choose instance launch options step, for VPC, choose the VPC name that ends with auto-healing-and-scaling/GameServerVPC.
- For Availability Zones and subnets, choose both subnet names that contain game-server-netSubnet.
- Scroll to the bottom of the page, and then click Next (not shown).
- Go to the next step.
Step21
- In the Integrate with other services step, for Load balancing, choose No load balancer.
- In the VPC Lattice integration options section, keep the default settings.
- Go to the next step.
Step22
- In the Health checks section, for Health check grace period, type: 240
- Click Next.
- Go to the next step.
Step23
- In the Configure group size and scaling step, for Desired capacity, type: 2
- For Min desired capacity, type: 2
- For Max desired capacity, type: 4
- Scroll down to the bottom of the page, and then click Next (not shown).
- Go to the next step.
Step24
- In the Add notifications step, click Skip to review.
- Go to the next step.
Step25
- In the Review step, review your configuration settings.
- At the bottom of the page, click Create Auto Scaling group.
- Go to the next step.
Step26
- In the success alert, review the message.
- Under Status, review the status of the Auto Scaling group.
- You can proceed while the group is updating.
- Click RegularCustomerGameServer.
- Go to the next step.
Step27
- Click the Activity tab.
- In the Activity history section, review to see that two instances were created to meet the “desired and actual capacity.”
- Click the Automatic scaling tab.
- Go to the next step.
Step28
- In the Dynamic scaling policies section, click Create dynamic scaling policy.
- Go to the next step.
Step29
- For Policy type, choose or keep Target tracking scaling.
- For Scaling policy name, type:
CPU Utilization
- For Metric type, choose Average CPU utilization.
- For Target value, type: 70
- Click Create.
- Go to the next step.
Step30
- In the success alert, review the message.
- Review the created target tracking scaling policy.
- Go to the next step.
Step31
- In the Scheduled actions section, click Create scheduled action.
- Go to the next step.
Step32
- In the pop-up box, for Name, type:
SecondWaveOfRegulars
- For Desired capacity, type: 3
- For Min, type: 3
- For Max, type: 4
- For Recurrence, choose Every week.
- For Specific start time, choose a future date.
- In the next text box, type 20:00.
- Click Create.
- Go to the next step.
Step33
- In the Scheduled actions section, review the new scheduled action.
- Go to the next step.
Step34
- Return to the Instances page on the Amazon EC2 console.
- Review the two new instances being created by the Auto Scaling group.
- If the instances are not displayed, click the section’s refresh icon.
- Go to the next step.
Step35
- Navigate to the Amazon CloudWatch console.
- Remember you can use the Services search box (or click Services) on the top navigation bar to navigate to a different service console.
- In the left navigation pane, click Alarms.
- In the Alarms section, click the alarm name that starts with TargetTracking-RegularCustomerGameServer-AlarmHigh-.
- Go to the next step.
Step36
- On the CPUUtilization graph, review the red In alarm line at the 70 percent axis.
- This parameter was defined when you created the CPU Utilization scaling policy in the Auto Scaling group.
- Review the blue CPUUtilization line.
- This line represents the current average CPU usage.
- If you do not see the blue line, the data might not have populated yet.
- Go to the next step.
Step37
- At the bottom of the page, click the Actions tab.
- For the Auto Scaling action, review the description.
- Go to the next step.
Step1
- Review the practice lab tasks in the Concept section.
- Click Start Lab or Open AWS Console to begin.
- Follow the lab instructions carefully, and use the arrows to navigate between steps.
AWS services not used in this lab are disabled in the lab environment. In addition, the capabilities of the services used in this lab are limited to what the lab requires.
Step2
- In the top navigation bar search box, type:
ec2
- In the search results, under Services, click EC2.
- Go to the next step.
Step3
- In the left navigation pane, click Auto Scaling Groups.
- In the Auto Scaling groups section, choose the checkbox to select TravelAgencyWebServers.
- Below that section, on the Details tab, review the current capacity details.
- Go to the next step.
Step4
- In the Network section, review to see that the Auto Scaling group is configured with a single subnet in one Availability Zone.
- Distributing instances across multiple Availability Zones helps maintain application availability by balancing replacement instances across these zones when failures occur.
- Go to the next step.
Step5
- Scroll up to the tab ribbon, and then click the Instance management tab.
- Review to see that the Auto Scaling group contains one EC2 instance.
- Go to the next step.
Step6
- In the left navigation pane, click Target Groups.
- Click Create target group.
- Go to the next step.
Step7
- In the Settings section, Choose Instances.
- Scroll down to Target group name.
- Go to the next step.
Step8
- For Target group name, type:
TravelAgencyWebServer-TG
- Scroll down to the VPC section.
- Go to the next step.
Step9
- For VPC, choose (lab/TravelAgencyVpc).
- Scroll down to the bottom of the page.
- Click Next, then click Next again (now shown). 4 Go to the next step.
Step10
- Scroll down to the bottom of the page.
- Click Create target group.
- Go to the next step.
Step11
- Review successful target group creation.
- In the left navigation pane, click Load Balancers.
- Go to the next step.
Step12
- Click Create load balancer.
- Go to the next step.
Step13
- In Load balancer types, under Application Load Balancer, click Create.
- Go to the next step.
Step14
- For Load balancer name, type:
TravelAgencyServers-ALB
- Under Scheme, select Internet-facing.
- Scroll down to VPC.
- Go to the next step.
Step15
- For VPC, choose lab/TravelAgencyVpc.
- Under Availability Zones and subnets, choose us-east-1a.
- For Subnet for us-east-1a, choose the public subnet.
- Repeat steps 2 and 3 for us-east-1b and us-east-1c.
- Make sure to choose the public subnet for each Availability Zone.
- Go to the next step.
Step16
- For Security groups, remove default and choose TravelAgencyWebServer.
- Go to the next step.
Step17
- Under Default action for Listeners and routing, choose Forward to target groups.
- For Target group, choose TravelAgencyWebServer-TG.
- Scroll down to Summary.
- Go to the next step.
Step18
- Review the load balancer configuration summary.
- Go to the next step.
Step19
- Click Create load balancer.
- Go to the next step.
Step20
- In the left navigation pane click Auto Scaling Groups.
- Choose TravelAgencyWebServers.
- Go to the next step.
Step21
- Click on the Integrations tab.
- In the Load balancing section, Click Edit.
- Go to the next step.
Step22
- Under Load balancing, choose Application, Network or Gateway Load Balancer target groups.
- For target groups, choose the TravelAgencyWebServer-TG.
- Click Update.
- Go to the next step.
Step23
- In the left navigation pane, click Security Groups.
- In the Security Groups section, click Create security group.
- Go to the next step
Step24
1 . In the Basic details section, for Security group name, type:
Get Shoaib Ahmed’s stories in your inbox
Join Medium for free to get updates from this writer.
TravelAgencyLoadBalancer
- For Description, type a description that you like, such as Allow access to the travel agency load balancer from the internet.
- For VPC, choose the VPC name that ends with lab/TravelAgencyVpc.
- In the Inbound rules section, click Add rule.
- Go to the next step.
Step25
- For Type, choose HTTP.
- To allow all inbound traffic, for Source, in the Custom search box, choose 0.0.0.0/0.
- Go to the next step.
Step26
- In the Outbound rules section, for Type, choose HTTP.
- For Destination, next to Custom, choose the TravelAgencyWebServer security group.
- To remove the 0.0.0.0/0 destination, click the X (not shown).
- Click Create security group.
- Go to the next step.
Step27
- In the left navigation pane, click Security Groups.
- In the Security Groups section, choose the checkbox to select the TravelAgencyWebServer security group.
- On the Actions dropdown list, choose Edit inbound rules.
- Go to the next step.
Step28
- In the Inbound rules section, to remove the existing rule, click Delete.
- To modify a rule type, you must delete the existing rule.
- To add a new rule, click Add rule.
- Go to the next step.
Step29
- For Type, choose HTTP.
- For Source, next to Custom, choose the TravelAgencyLoadBalancer security group.
- Click Save rules.
- Go to the next step.
Step30
- In the left navigation pane, click Load Balancers.
- In the Load balancers section, click TravelAgencyWebServers-1.
- Go to the next step.
Step31
- Click the Security tab.
- Click Edit.
- Go to the next step.
Step32
- For Security groups, to deselect the TravelAgencywebServer security group, click the X.
- Go to the next step.
Step33
- Choose the TravelAgencyLoadBalancer security group.
- Click Save changes.
- Go to the next step.
Step34
- In the success alert, review the message.
- For the Application Load Balancer, under DNS name, click the copy icon to copy the provided name.
- Go to the next step.
Step35
- In a new browser tab (or window) address bar, paste the DNS name that you just copied, and then add http:// to the beginning and press Enter (not shown).
- If you receive an error alert, check that the URL begins with http:// (not https://). The page is hosted only with HTTP.
- If you don’t see your application, check the rules in the security group that you associated with the load balancer.
- Review the HTML page, which should look similar to what is displayed in the screenshot example.
- The travel agency web application is now behind an Application Load Balancer.
- Go to the next step.
Step36
- In the same browser tab, at the end of the address that you just edited, type:
/health
and press Enter.
- Review the short message that loads, stating that the instance is healthy.
- Keep this browser tab open for later health checks.
- Go to the next step.
Step37
- Return to the Amazon EC2 console in the other browser tab.
- In the left navigation pane, click Target Groups.
- In the Target groups section, choose the checkbox to select TravelAgencyWebServers-1.
- Below that section, click the Health checks tab.
- In the Health check settings section, click Edit.
- Go to the next step.
Step38
- For Health check path, type:
/health
- Click to expand Advanced health check settings.
- Go to the next step.
Step39
- For Unhealthy threshold, type: 2
- For Timeout, type: 2
- For Interval, type: 5
- Click Save changes.
- The default settings mark instances unhealthy after 150 seconds (5 checks at 30-second intervals). The new settings mark instances unhealthy after 10 seconds (2 checks at 5-second intervals).
- Go to the next step.
Step40
- In the left navigation pane, click Auto Scaling Groups.
- In the Auto Scaling groups section, choose the checkbox to select TravelAgencyWebServers.
- If the group is already selected and the bottom window is empty, clear the checkbox and choose it again.
- Below that section, on the Details tab, in the Network section, click Edit.
- Go to the next step.
Step41
- For Availability Zones and subnets, keep or choose subnet lab/TravelAgencyVpc/PublicSubnet1.
- If any other subnets are selected, click the X to remove them.
- Click Update.
- Go to the next step.
Step42
- In the left navigation pane, click Instances.
- In the Instances section, choose the checkbox to select the TravelAgencyWebServers instance.
- Under Instance ID, review the ID.
- Below that section, click the Networking tab.
- Under Subnet ID, review to see that the instance is in subnet lab/TravelAgencyVpc/PublicSubnet1.
- In the Instances section, on the Instance state dropdown list, choose Terminate (delete) instance.
- In the pop-up box (not shown), click Terminate (delete).
- Terminating the instance invokes a new instance launch in the public subnet because it reduces the Auto Scaling group below its minimum count.
- Go to the next step.
Step43
- After a few minutes, in the Instances section, click the refresh icon.
- The instances list should now include the newly created instance.
- Choose the checkbox to select the new instance.
- Under Instance ID, review the new instance’s ID.
- Below that section, click the Networking tab.
- Under Subnet ID, review to see that the new instance is in subnet lab/TravelAgencyVpc/PublicSubnet1.
- Go to the next step.
Step44
- In the left navigation pane, click Auto Scaling Groups.
- In the Auto Scaling groups section, choose the checkbox to select TravelAgencyWebServers.
- If the group is already selected and the bottom window is empty, clear the checkbox and choose it again.
- Below that section, click the Activity tab.
- Go to the next step.
Step45
- In the Activity history section, review to see that the old instance was terminated.
- Review to see that the Auto Scaling group responded by creating a new instance.
- Go to the next step.
Step46
- Return to the health check page in the other browser tab.
- Click the browser’s refresh icon.
- Review the message.
- If you receive an error alert, wait a little longer and click the refresh icon again.
- In the message, note that the instance ID value has changed to the new instance.
- Go to the next step.
Step47
- In the other browser tab, return to the Auto Scaling groups page on the Amazon EC2 console.
- Review to confirm that the TravelAgencyWebServers group is still selected.
- Below that section, on the Details tab, in the Network section, click Edit.
- Go to the next step.
Step48
- For Availability Zones and subnets, choose subnet lab/TravelAgencyVpc/PublicSubnet2.
- Both lab/TravelAgencyVpc/PublicSubnet1 and lab/TravelAgencyVpc/PublicSubnet2 should now be selected.
- Click Update.
- Go to the next step.
Step49
- In the success alert, review the message.
- On the Details tab, in the TravelAgencyWebServers Capacity overview section, click Edit.
- Go to the next step.
Step50
- In the pop-up box, for Desired capacity, type: 2.
- Review Max desired capacity updated to 2.
- Click Update.
- Go to the next step.
Step51
- In the success alert, review the message.
- Click the Activity tab.
- Go to the next step.
Step52
- Review to see that a new instance is launching.
- Note the new instance ID.
- Go to the next step.
Step53
- In the left navigation pane, click Instances.
- In the Instances section, choose the checkbox to select the instance with the new instance ID from the previous step.
- Below that section, click the Networking tab.
- Under Subnet ID, review to see that the new instance is in subnet lab/TravelAgencyVpc/PublicSubnet2.
- Go to the next step.
Step54
- Return to the health check page in the other browser tab.
- Click the browser’s refresh icon.
- Review the message.
- You might need to click the refresh icon several times.
- In the message, note that the instance ID changed to the newest instance.
- Go to the next step.
Step1
- Review the practice lab tasks in the Concept section.
- Click Start Lab or Open AWS Console to begin.
- Follow the lab instructions carefully, and use the arrows to navigate between steps.
AWS services not used in this lab are disabled in the lab environment. In addition, the capabilities of the services used in this lab are limited to what the lab requires.
Step2
- In the top navigation bar search box, type:vpc
- In the search results, under Services, click VPC.
- Go to the next step.
Step3
- In the left navigation pane, click Your VPCs.
- In the Your VPCs section, review the available Marketing, Finance, and Developer VPCs.
- Go to the next step.
Step4
- In the top navigation bar search box, type:ec2
- In the search results, under Services, click EC2.
- Go to the next step.
Step5
- On the Dashboard, in the Resources section, click Instances (running).
- Go to the next step.
Step6
- In the Instances section, choose the checkbox to select the FinanceServer instance.
- Below that section, click the Networking tab.
- Review to see that no Public IPv4 address or Public IPv4 DNS is currently populated.
- An instance created in a private subnet has no public addresses.
- Under Private IPv4 addresses, click the copy icon to copy the provided IP address, and then paste it in the text editor of your choice on your device.
- You use this address in later steps.
- Under Subnet ID, review the provided ID.
- Go to the next step.
Step7
- In the Instances section, clear the checkbox to deselect the FinanceServer instance.
- Choose the MarketingServer instance.
- Below that section, on the Networking tab, under VPC ID, review the VPC that the MarketingServer instance belongs to.
- At the top of the Instances section, click Connect.
- Go to the next step.
Step8
- Choose the Session Manager card.
- Click Connect.
- The Session Manager terminal for the MarketingServer instance opens in a new browser tab (or window).
- Go to the next step.
Step9
- In the Session Manager terminal window, replacing the current IP address with the IP address of the FinanceServer that you copied in an earlier step, run (type the command and press Enter):
ping 172.31.x.xx
- This command checks the connection to the FinanceServer instance.
- Review to see that your command hangs, and there is no connection.
- There is no error alert.
- Because the FinanceServer instance uses only a private IP address, VPCs cannot establish routing paths to destinations outside their local private IP range.
- To exit the running process, press Ctrl+C on your keyboard.
- Go to next the step.
Step10
- In the other browser tab, return to Instances page on the Amazon EC2 console.
- Review to confirm that the MarketingServer instance is still selected.
- On the Networking tab, under Subnet ID, click the ID for MarketingPublicSubnet1.
- Go to the next step.
Step11
- In the Subnets section, choose the available subnet name.
- On the Details tab, under Route table, click the provided route ID.
- The VPC dashboard opens in a new browser tab (or window).
- Go to the next step.
Step12
- In the Route tables section, choose the available Marketing route table.
- On the Routes tab, review the routing rules.
- Two routes should be displayed: one route for local traffic and one route for internet traffic through the internet gateway.
- Go to the next step.
Step13
- In the left navigation pane, click Peering connections.
- In the Peering connections section, click Create peering connection.
- Go to the next step.
Step14
- In the Peering connection settings section, for Name, type:
Marketing <> Finance
- For VPC ID (Requester), on the dropdown list, choose the Marketing VPC.
- For VPC CIDRs, review to confirm that the Marketing VPC has 10.10.0.0/16 as its CIDR range.
- Go to the next step.
Step15
- For VPC ID (Accepter), choose the Finance VPC.
- For VPC CIDRs, review to confirm that the Finance VPC has 172.31.0.0/16 as its CIDR range.
- Click Create peering connection.
- Go to the next step.
Step16
- In the success alert, review the message.
- In the Details section, under Status, review to confirm that the status is Pending Acceptance.
- Click Actions to expand the dropdown list.
- Choose Accept request.
- Go to the next step.
Step17
- In the pop-up box, click Accept request.
- Go to the next step.
Step18
- In the success alert, review the message.
- In the Details section, under Status, review to confirm that the status is Active.
- Go to the next step.
Step19
- In the other browser tab, return to the Instances page on the Amazon EC2 console.
- Choose the MarketingServer instance.
- On the Details tab, under Subnet ID, click the provided ID.
- Go to the next step.
Step20
- In the Subnets section, choose the the available subnet.
- On the Details tab, under Route table, click the provided ID.
- The VPC dashboard opens in a new browser tab (or window).
- Go to the next step.
Step21
- In the Route tables section, choose the Marketing route table.
- On the Routes tab, click Edit routes.
- Go to the next step.
Step22
- Click Add route.
- To configure the route, for Destination, in the new search box, type:
172.31.0.0/16
- This CIDR block belongs to the Finance VPC.
- For Target, choose Peering Connection.
- Below that, choose the peering connection target that contains Marketing <> Finance.
- Click Save changes.
- Go to the next step.
Step23
- In the success alert, review the message.
- On the Routes tab, review the newly created route.
- The new route directs traffic that originates from the Marketing VPC (10.10.0.0/16) intended for the Finance VPC (172.31.0.0/16) through the peering connection.
- Go to the next step.
Step24
- In the other browser tab, return to the Instances page on the Amazon EC2 console.
- Choose the FinanceServer instance.
- You might need to clear the checkbox for the MarketingServer instance.
- On the Details tab, under Subnet ID, click the provided ID.
- Go to the next step.
Step25
- In the Subnets section, choose the available subnet.
- On the Details tab, under Route table, click the provided route ID.
- The VPC dashboard opens in a new browser tab (or window).
- Go to the next step.
Step26
- In the Route tables section, choose the Finance route table.
- On the Routes tab, click Edit routes.
- Go to the next step.
Step27
- Click Add route.
- To configure the route, for Destination, in the new search box, type:
10.10.0.0/16
- This CIDR block belongs to the Marketing VPC.
- For Target, choose Peering Connection.
- Below that, choose the peering connection target that contains Marketing <> Finance.
- Click Save changes.
- Go to the next step.
Step28
- In the success alert, review the message.
- On the Routes tab, review the newly created route.
- The new route directs traffic that originates from the Finance VPC (172.31.0.0/16) intended for the Marketing VPC (10.10.0.0/16) through the peering connection.
- Go to the next step.
Step29
- In the other browser tab, return to the Instances page on the Amazon EC2 console.
- Choose the MarketingServer instance.
- You might need to clear the checkbox for the FinanceServer instance.
- For clarity, you can also close all other open browser tabs.
- Click Connect.
- Go to the next step.
Step30
- Choose the Session Manager card.
- Click Connect.
- The Session Manager terminal for the MarketingServer instance opens in a new browser tab (or window).
- Go to the next step.
Step31
- In the Session Manager terminal window, replacing the current IP address with the IP address that you copied in an earlier step, run:
ping 172.31.x.xx
- This is the private IPv4 address is for the FinanceServer instance.
- Review to see that the ping command is still not working.
- To exit the running process, press Ctrl+C on your keyboard.
- Go to the next step.
Step32
- In the other browser, return to the Instances page on the Amazon EC2 console.
- Choose the FinanceServer instance.
- Click the Security tab.
- Under Security groups, click the provided security group name that contains FinanceServerSecurityGroup.
- Go to the next step.
Step33
- On the Inbound rules tab, click Edit inbound rules.
- Go to the next step.
Step34
- Click Add rule.
- For Type, choose Custom ICMP — IPv4.
- For Source, in the new search box, type and choose:
10.10.0.0/16
- Click Save rules.
- Go to the next step.
Step35
- In the other browser tab, return to the Session Manager terminal.
- If the Session Manager command line has timed out, you need to connect to the MarketingServer instance from the Session Manager tab again.
- In the terminal window, replacing the current IP address with the IP address that you copied in an earlier step, run:
ping <172.31.x.xx>
Step1
- Review the practice lab tasks in the Concept section.
- Click Start Lab or Open AWS Console to begin.
- Follow the lab instructions carefully, and use the arrows to navigate between steps.
AWS services not used in this lab are disabled in the lab environment. In addition, the capabilities of the services used in this lab are limited to what the lab requires.
Step2
- In the top navigation bar search box, type:iam
- In the search results, under Services, click IAM.
- Go to the next step.
Step3
- In the left navigation pane, click User groups.
- In the User groups section, click Create group.
- Go to the next step.
Step4
- For User group name, type:
SupportEngineers
- The group name is case sensitive and must be entered exactly as shown.
- Go to the next step.
Step5
- In the Attach permissions policies search box, type:
AmazonEC2ReadOnlyAccess
and press Enter.
- Choose the checkbox to select AmazonEC2ReadOnlyAccess.
- Under Description, review the policy description.
- Click Create user group.
- If you get an error, check the group name spelling and capitalization. You must use “SupportEngineers” exactly as shown.
- Go to the next step.
Step6
- In the left navigation pane, click Users.
- In the Users section, click Create user.
- Go to the next step.
Step7
- In the Specify user details step, for User name, type:
support-engineer-1
- The user name is case sensitive and must be entered exactly as shown.
- Choose the checkbox to select Provide user access to the AWS Management Console.
- For Console password, choose Custom password.
- Below that, in the text box, type:
supportPassword!123
- Your password needs at least 8 characters and must combine uppercase letters, lowercase letters, numbers, and symbols. These requirements are mandatory for signing in.
- Clear the checkbox to deselect Users must create a new password at next sign-in.
- Click Next.
- Go to the next step.
Step8
- In the Set permissions step, for Permissions options, choose Add user to group.
- In the User groups section, choose the checkbox to select SupportEngineers.
- Click Next.
- Go to the next step.
Step9
- In the Review and create step, in the Tags section, click Add new tag.
- For Key, type:
job-title
- For Value, type:
Support Engineer
- Click Create user.
- Go to the next step.
Step10
- In the Retrieve password step, under Console sign-in URL, click the copy icon to copy the provided URL, and then paste it in the text editor of your choice on your device.
- You can also click Download .csv file, which contains the console sign-in link and credentials.
- Click Return to users list.
- In the pop-up box (not shown), click Continue.
- Go to the next step.
Step11
- Click the user name support-engineer-1.
- Go to the next step.
Step12
- Click the Security credentials tab.
- Review the Multi-factor authentication (MFA) section.
- MFA adds an extra layer of security. Even if someone gets your password, they can’t access your account without the second authentication code from your MFA device.
- Review the Access keys section.
- Access keys provide programmatic access to AWS. They consist of an access key ID and a secret access key — you need both parts to make requests. These are permanent credentials for IAM or root users.
- Go to the next step.
Step13
- In a new incognito or private browsing window address bar, paste the console sign-in URL that you copied in an earlier step, and then press Enter (not shown).
- By using an incognito or private browsing window for this step, you can remain logged in with your original credentials in the previous browser window.
- For IAM username, type:
support-engineer-1
- For Password, type:
supportPassword!123
- Click Sign in.
- Go to the next step.
Step14
- In the top navigation bar search box, type:ec2
- In the search results, under Services, click EC2.
- Go to the next step.
Step15
- On the top navigation bar, click the Region selector to expand the dropdown list.
- Keep or choose US East (N. Virginia) us-east-1.
- Go to the next step.
Step16
- On the Dashboard, in the Resources section, click Instances (running).
- Go to the next step.
Step17
- In the Instances section, choose the checkbox to select the WebServer instance.
- Click Instance state to expand the dropdown list.
- Choose Terminate (delete) instance.
- Go to the next step.
Step18
- In the pop-up box, click Terminate (delete).
- Go to the next step.
Step19
- In the error alert, review the Failed to terminate message, stating that you cannot delete an instance due to user permissions.
- Go to the next step.









