0% found this document useful (0 votes)
83 views37 pages

Code Commands and Reference Links PDF

Uploaded by

nahid01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views37 pages

Code Commands and Reference Links PDF

Uploaded by

nahid01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Section 2

LESSON: Creating an AWS Free Tier Account


[Link]

LESSON: Create an Admin Group and User


[Link]

LESSON: AWS Global Infrastructure and VPC Overview


AWS links:
[Link]
[Link]

Digital Cloud Training - Training Notes:


[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 1
Section 3

LESSON: EC2 Security Group Lab

#!/bin/bash
yum update -y
yum install httpd -y
systemctl start httpd
systemctl enable httpd
cd /var/www/html
echo "This is a test page" > [Link]

Additional information

AWS links:
[Link]
[Link]

Digital Cloud Training - Training Notes:


[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 2
Section 3

LESSON: Instance metadata

curl [Link]

wget [Link]
chmod u+x ec2-metadata
ec2-metadata -help

Additional information

AWS links:
[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 3
Section 3

LESSON: Instance user data

#!/bin/bash
yum update -y
yum install httpd -y
systemctl start httpd
systemctl enable httpd
cd /var/www/html
echo "This is a test page running on Apache on EC2 in the AWS Cloud" > [Link]

curl [Link]

Additional information

AWS links:
[Link]
[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 4
Section 3

LESSON: Status Checks and Monitoring

sudo amazon-linux-extras install epel -y

sudo yum install stress -y

stress -c 8

Additional information

AWS links:
[Link]
[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 5
Section 3

LESSON: Private Subnets and Bastion Hosts

ssh-add -c (Linux) or ssh-add -k (Mac) ec2-user@public-IP-address

ssh -A ec2-user@private-IP-address

Additional information

AWS links:
[Link]
vpc/

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 6
Section 4

LESSON: Classic Load Balancer LESSON: Network Load Balancer


INSTANCE 1 #!/bin/bash
yum update -y
#!/bin/bash yum install httpd -y
yum update -y systemctl start httpd
yum install httpd -y systemctl enable httpd
systemctl start httpd cd /var/www/html
systemctl enable httpd aws s3 cp s3://dctlabs/[Link] ./
cd /var/www/html aws s3 cp s3://dctlabs/[Link] ./
echo "This is INSTANCE 1" > [Link] EC2NAME=`cat ./[Link]|sort -R|head -n 1|xargs`
sed "s/INSTANCE/$EC2NAME/" [Link] > [Link]

INSTANCE 2

#!/bin/bash
yum update -y
yum install httpd -y
systemctl start httpd
systemctl enable httpd
cd /var/www/html
echo "This is INSTANCE 2" > [Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 7
Section 4

LESSON: Application Load Balancer – Path Based LESSON: Auto Scaling and ALB
Routing
#!/bin/bash #!/bin/bash
yum update -y yum update -y
yum install httpd -y yum install httpd -y
systemctl start httpd systemctl start httpd
systemctl enable httpd systemctl enable httpd
cd /var/www/html cd /var/www/html
aws s3 cp s3://dctlabs/[Link] ./ aws s3 cp s3://dctlabs/[Link] ./
aws s3 cp s3://dctlabs/[Link] ./ aws s3 cp s3://dctlabs/[Link] ./
EC2NAME=`cat ./[Link]|sort -R|head -n 1|xargs` EC2NAME=`cat ./[Link]|sort -R|head -n 1|xargs`
sed "s/INSTANCE/$EC2NAME/" [Link] > [Link] sed "s/INSTANCE/$EC2NAME/" [Link] > [Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 8
Section 4

LESSON: ASG Scaling Policies LESSON: Cross-Zone Load Balancing Overview and Setting up
the Labs
sudo amazon-linux-extras install epel -y

sudo yum install stress -y #!/bin/bash


yum update -y
stress -c 8 yum install httpd -y
systemctl start httpd
systemctl enable httpd
cd /var/www/html
aws s3 cp s3://dctlabs/[Link] ./
aws s3 cp s3://dctlabs/[Link] ./
EC2NAME=`cat ./[Link]|sort -R|head -n 1|xargs`
sed "s/INSTANCE/$EC2NAME/" [Link] > [Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 9
Section 4

LESSON: CLB - Cross-Zone Load Balancing LESSON: CLB - Cross-Zone Load Balancing
#!/bin/bash #!/bin/bash
yum update -y yum update -y
yum install httpd -y yum install httpd -y
systemctl start httpd systemctl start httpd
systemctl enable httpd systemctl enable httpd
cd /var/www/html cd /var/www/html
aws s3 cp s3://dctlabs/[Link] ./ aws s3 cp s3://dctlabs/[Link] ./
aws s3 cp s3://dctlabs/[Link] ./ aws s3 cp s3://dctlabs/[Link] ./
EC2NAME=`cat ./[Link]|sort -R|head -n 1|xargs` EC2NAME=`cat ./[Link]|sort -R|head -n 1|xargs`
sed "s/INSTANCE/$EC2NAME/" [Link] > [Link] sed "s/INSTANCE/$EC2NAME/" [Link] > [Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 10
Section 4

LESSON: ALB - Cross-Zone Load Balancing


#!/bin/bash
yum update -y
yum install httpd -y
systemctl start httpd
systemctl enable httpd
cd /var/www/html
aws s3 cp s3://dctlabs/[Link] ./
aws s3 cp s3://dctlabs/[Link] ./
EC2NAME=`cat ./[Link]|sort -R|head -n 1|xargs`
sed "s/INSTANCE/$EC2NAME/" [Link] > [Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 11
Section 4

LESSON: ALB Listeners and SSL TLS LESSON: Public ALB with Private Instances and Security Groups

#!/bin/bash #!/bin/bash
yum update -y yum update -y
yum install httpd -y yum install httpd -y
systemctl start httpd systemctl start httpd
systemctl enable httpd systemctl enable httpd
cd /var/www/html cd /var/www/html
aws s3 cp s3://dctlabs/[Link] ./ aws s3 cp s3://dctlabs/[Link] ./
aws s3 cp s3://dctlabs/[Link] ./ aws s3 cp s3://dctlabs/[Link] ./
EC2NAME=`cat ./[Link]|sort -R|head -n 1|xargs` EC2NAME=`cat ./[Link]|sort -R|head -n 1|xargs`
sed "s/INSTANCE/$EC2NAME/" [Link] > [Link] sed "s/INSTANCE/$EC2NAME/" [Link] > [Link]

Additional information

AWS links:
[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 12
Section 4

LESSON: Proxy Protocol, X-Forwarded-For and Logging

[Link]
[Link]

Additional information
AWS links:
[Link]
[Link]
[Link]
[Link]

Digital Cloud Training - Training Notes:


[Link]
[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 13
Section 5

LESSON: Create a Custom VPC LESSON: Endpoint Services


[Link] #!/bin/bash
yum update -y
LESSON: Network ACLs yum install httpd -y
systemctl start httpd
#!/bin/bash systemctl enable httpd
yum update -y cd /var/www/html
yum install httpd -y aws s3 cp s3://dctlabs/[Link] ./
systemctl start httpd aws s3 cp s3://dctlabs/[Link] ./
systemctl enable httpd EC2NAME=`cat ./[Link]|sort -R|head -n 1|xargs`
cd /var/www/html sed "s/INSTANCE/$EC2NAME/" [Link] > [Link]
aws s3 cp s3://dctlabs/[Link] ./
aws s3 cp s3://dctlabs/[Link] ./ LESSON: VPC Flow Logs
EC2NAME=`cat ./[Link]|sort -R|head -n 1|xargs`
sed "s/INSTANCE/$EC2NAME/" [Link] > [Link]
[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 14
Section 5

Additional information
AWS links:
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]

Digital Cloud Training - Training Notes:


[Link]
[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 15
Section 6

LESSON: Route 53 Overview

[Link]

LESSON: Setting up the Lab

#!/bin/bash
yum update -y
yum install httpd -y
systemctl start httpd
systemctl enable httpd
cd /var/www/html
aws s3 cp s3://dctlabs/[Link] ./
EC2AZ=$(curl -s [Link]
sed "s/INSTANCE/the EC2 instance in $EC2AZ/" [Link] > [Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 16
Section 6

Additional information
AWS links:
[Link]

Digital Cloud Training - Training Notes:


[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 17
Section 7

LESSON: Identity-Based Policy Examples


[Link]
[Link]

LESSON: Resource-Based Policy Examples


[Link]

LESSON: Cross Account Access


[Link]

LESSON: Access Control Lists

[Link]
[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 18
Section 7

LESSON: Choosing Access Control Options

[Link]

LESSON: Multipart Upload

[Link]
[Link]
[Link]

LESSON: Query String Authentication

[Link]

LESSON: Transfer Acceleration

[Link]
[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 19
Section 7

LESSON: Static Websites

[Link]
[Link]
[Link]

LESSON: Versioning and MFA Delete

[Link]

LESSON: Cross Region Replication

[Link]

LESSON: Lifecycle Management

[Link]
[Link]
[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 20
Section 7

LESSON: S3 Encryption

[Link]

LESSON: Object Lock


[Link]
[Link]

LESSON: CloudFront with ALB and EC2 Custom Origin

#!/bin/bash
yum update -y
yum install httpd -y
systemctl start httpd
systemctl enable httpd
cd /var/www/html
aws s3 cp s3://dctlabs/[Link] ./
aws s3 cp s3://dctlabs/[Link] ./
EC2NAME=`cat ./[Link]|sort -R|head -n 1|xargs`
sed "s/INSTANCE/$EC2NAME/" [Link] > [Link]
© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 21
Section 7

Additional information

Digital Cloud Training - Training Notes:


[Link]
[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 22
Section 8

LESSON: Working with Snapshots

[Link]

LESSON: EBS Performance

[Link]

LESSON: Create a User Home Directory

[Link]

Additional information

AWS links: Digital Cloud Training - Training Notes:


[Link] [Link]
[Link] [Link]
[Link]
[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 23
Section 9

LESSON: Setting up for the Labs

[Link]

LESSON: Upload Image to ECR and create task on Fargate

[Link]

Additional information

AWS links:
[Link]
[Link]
[Link]
[Link]

Digital Cloud Training - Training Notes:


[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 24
Section 10

LESSON: Lambda Overview


[Link]
[Link]

LESSON: Preparing for the Labs


[Link]

LESSON: Create function to resize images in S3


[Link]

LESSON: Create function to log event when records updated in DynamoDB


[Link]

LESSON: Build a Hello World API with Lambda Proxy Integration


[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 25
Section 10

LESSON: Create a Simple Microservice using Lambda and API Gateway

[Link]

Additional information
AWS links:
[Link]
[Link]
[Link]
[Link]

Digital Cloud Training - Training Notes:


[Link]
[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 26
Section 11

LESSON: Databases Overview


[Link]
[Link]

Install WordPress on EC2 using RDS MySQL DB

WordPress:

yum update -y yum install php-mbstring -y


amazon-linux-extras install -y php7.2 systemctl restart httpd
yum install -y httpd systemctl restart php-fpm
systemctl start httpd wget [Link]
systemctl enable httpd [Link]
cd /var/www/html mkdir phpMyAdmin && tar -xvzf [Link] -C
tar -xzf [Link] phpMyAdmin --strip-components 1
cp -r wordpress/* ./ rm [Link]
chmod -R 755 wp-content
chown -R apache:apache wp-content

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 27
Section 11

LESSON: PHP My Admin


yum install php-mbstring -y
systemctl restart httpd
systemctl restart php-fpm
wget [Link]
mkdir phpMyAdmin && tar -xvzf [Link] -C phpMyAdmin --strip-components 1
rm [Link]

Edit config:
nano [Link]

Add text (enter RDS endpoint):


$cfg['Servers'][$i]['host'] = 'RDS MYSQL ENDPOINT';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';

cp [Link] [Link]
service httpd restart

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 28
Section 11

LESSON: Amazon Aurora Overview


[Link]
[Link]

LESSON: Create DynamoDB DAX Cluster and Test Cache


[Link]

LESSON: ElastiCache Overview


[Link]

LESSON: RedShift Overview and Create Cluster


[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 29
Section 11

Additional information
AWS links:
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]

Digital Cloud Training - Training Notes:


[Link]
[Link]
[Link]
[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 30
Section 12

LESSON: Consume events in Lambda from a Kinesis Stream


[Link]

Additional information
AWS links:
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]

Digital Cloud Training - Training Notes:


[Link]
[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 31
Section 13

LESSON: AWS Step Functions


[Link]

LESSON: Simple Queue Service


[Link]

[Link]

[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 32
Section 13

Additional information

AWS links:
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]

Digital Cloud Training - Training Notes:


[Link]
[Link]
[Link]
[Link]
[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 33
Section 14

LESSON: Create HA WordPress with Elastic Beanstalk and RDS


[Link]

Additional information
AWS links:
[Link]
[Link]
[Link]
[Link]

Digital Cloud Training - Training Notes:


[Link]
[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 34
Section 15

Additional information
AWS links:
[Link]
[Link]
[Link]
[Link]

Digital Cloud Training - Training Notes:


[Link]
[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 35
Section 16

LESSON: CloudHSM
[Link]

LESSON: AWS WAF and Shield


[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 36
Section 16

Additional information
AWS links:
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]

Digital Cloud Training - Training Notes:


[Link]
[Link]
[Link]

© 2019 Digital Cloud Training - AWS Certified Solutions Architect Associate Hands-on Labs 37

You might also like