nealdct / aws-csaa-code Goto Github PK
View Code? Open in Web Editor NEWCode used in our AWS Certified Solutions Architect Associate course
Code used in our AWS Certified Solutions Architect Associate course
Hi Neal,
Firstly, let me say that I think you have the best slides and style of course delivery compared to your competitors on udey or tutorials dojo. Thanks for sharing your good work.
I've seen that you have committed on April 2 so I've re downloaded the zip but I still have the same problem.
2 things:
pure cosmetics: /Code/Auto\ Scaling\ and\ ELB/user-data-az.md
has the markdown extention instead of .sh
of course since we are prompted to copy and paste it it doesn't really matter. It did however make me second guess weather I was in the correct folder...
I have of course only copied line 4 thru 12 as indicated. But my web servers don't display the output shown in your browser as demonstrated in the video "Section 4: Elastic Load Balancing and Auto Scaling: 63. [HOL] Application Load Balancer". Here the code I pasted from the user-data-az.md
:
#!/bin/bash
yum update -y
yum install -y httpd
systemctl start httpd
systemctl enable httpd
aws s3 cp s3://my-website-assets-2313243d/index.html ./
cp index.html index.txt
EC2AZ=$(TOKEN=`curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"` && curl -H "X-aws-ec2-metadata-token: $TOKEN" -v http://169.254.169.254/latest/meta-data/placement/availability-zone)
sed "s/AZID/$EC2AZ/" /var/www/html/index.txt > /var/www/html/index.html
To find out what has happened to my index.html
file I went into the cloud-shell of the both of the 2 instance we have set up via the ASG:
$ ls -a /var/
shows me that there is no directory called www/
in /var/ thus there is no
index.html` to be displayed.
When I manually run line 9 in the cloudshell of the instance from your script (aws s3 cp s3://my-website-assets-2313243d/index.html ./
) I get
[cloudshell-user@ip-x-x-x-x ~]$ aws s3 cp s3://my-website-assets-2313243d/index.html ./
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
Maybe you know what is going on? Your help would be much appreciated.
Working on lesson 109. The replications permissions file is missing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.