0% found this document useful (1 vote)
56 views

AWS Lab Notes

AWS Cloud Computing Lab Tutorials For Free

Uploaded by

Prasanna Krishna
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 (1 vote)
56 views

AWS Lab Notes

AWS Cloud Computing Lab Tutorials For Free

Uploaded by

Prasanna Krishna
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/ 68

Table of Contents

Contents
Table of Contents ......................................................................................................................................................1
About the Lab ............................................................................................................................................................3
Checking your AWS Usage and Monthly Bill .......................................................................................................4
Creating an S3 Bucket and Uploading Files .........................................................................................................6
Uploading Files to your Bucket .............................................................................................................................7
Downloading files from your bucket ....................................................................................................................9
Troubleshooting..................................................................................................................................................10
Clean Up..............................................................................................................................................................10
Creating a SQL Database with RDS ....................................................................................................................13
Creating a Security Group...................................................................................................................................13
Creating an RDS Database ..................................................................................................................................16
Connecting to your RDS Instance .......................................................................................................................22
Troubleshooting Connection Issues ...................................................................................................................27
Clean Up..............................................................................................................................................................29
Creating a Web Server with EC2..........................................................................................................................32
Viewing your web server ....................................................................................................................................39
Troubleshooting viewing your WordPress application ......................................................................................40
Finding the Username and Password for your WordPress application ..............................................................42
Troubleshooting logging in to the WordPress application .................................................................................44
Clean up ..............................................................................................................................................................45
Sending Emails with Amazon SES ......................................................................................................................47
Requesting full access to SES ..............................................................................................................................49
Creating a Billing Alert with CloudWatch and SNS............................................................................................50
Enabling Billing Alerts .........................................................................................................................................50
Creating a CloudWatch Alarm ............................................................................................................................51
Creating an IAM User .............................................................................................................................................59
Creating a Highly Available Architecture with Elastic Beanstalk .....................................................................62
Clean Up..............................................................................................................................................................65
About the Lab

Please note that not all AWS services are supported in all regions. Please use
the US-East-1 (North Virginia) region for this lab.

These lab notes are to support the hands on instructional videos of the Introduction to AWS section of the
BackSpace AWS Cloud Practitioner Course.

Please note that AWS services change on a weekly basis and it is extremely important
you check the version number on this document to ensure you have the latest version
with any updates or corrections.
Checking your AWS Usage and
Monthly Bill
Creating an S3 Bucket and
Uploading Files
Uploading Files to your Bucket
Downloading files from your bucket

Click Exit to navigate back to the bucket details.

Click on the folder to view its contents

Select one of the files

Select Actions -> Download


Troubleshooting

If you get the following screen it means you have clicked on the S3 URL and not the download link as detailed
above. You cannot access files directly from a URL as they have private access.

Clean Up

We will now delete the files and bucket so that you will not be billed by AWS.

Go back to the S3 dashboard.


Select the bucket

Click Empty

Enter permanently delete

Click Empty

You will see a green success message

Click Exit
Click Delete

Confirm the name of the bucket to delete

Click Delete bucket


Creating a SQL Database with RDS

Creating a Security Group

By default, inbound access from the Internet to our database instance is blocked. We will create a security group
that defines an inbound rule that allows access from the Internet. We can then associate this security group to
our database instance.

Scroll down and select Security > Security Groups

Click Create security group


Give it the name backspace-rds-intro-lab

Give it a description

Click Add rule for Inbound rules

Select type MySQL/Aurora

Select source Anywhere

Click Create security group


Creating an RDS Database
Connecting to your RDS Instance

https://dev.mysql.com/doc/workbench/en/wb-installing-windows.html

https://dev.mysql.com/doc/workbench/en/wb-installing-mac.html

https://dev.mysql.com/doc/workbench/en/wb-installing-linux.html
Troubleshooting Connection Issues

If you are getting connection errors then check the following:

Wrong Username / Password

Make sure you use the correct username and password.

The username and password must be the one created when the RDS instance was created.

Bad Connection String

This error means nothing exists at the endpoint. Check the connection endpoint and port are correct.

The hostname will be the RDS Instance Connection Endpoint without :3306 on the end.
No Connection

This error means your server exists but you are unable to connect to it. This can be caused by:

- You have not selected ‘public’ when creating instance and the security group inbound rules will be
incorrect. This will block traffic to your instance. See Security Group Inbound Rules below.
- You have a dynamic IP address or multiple IP addresses passing through a load balancer. See Security
Group Inbound Rules below.
- Firewall at your end is blocking access to port 3306. See Client-side Firewall below.

Security Group Inbound Rules

If you did not as detailed, your security group will block remote access.
The security group may have an inbound rule for your IP address. If you are using a dynamic IP address or you are
connecting from different networks then this will need to be changed to “anywhere” for the lab.

Click the security group

You will be taken to the EC2 console


Select the “Inbound” tab
Click “Edit”

Change inbound rule to “Anywhere” 0.0.0.0/0, ::/0

Client-side Firewall
If you are still having problems connecting, a firewall at your end may be preventing access on port 3306. This is
common if you are connecting from your work environment as port 3306 traffic may be blocked.

Clean Up
Creating a Web Server with EC2

From the AWS console search EC2

Click EC2

Select Instances -> Launch Instances


Select the AWS Marketplace and search for WordPress

Select the Bitnami AMI

Click Continue (This lab will be covered under the AWS free tier for accounts less than 12 months old)
Choose the t2 micro instance.

Click Next: Configure Instance Details

Select enable for Auto-assign Public IP

Click Next: Add Storage


Click Next: Add Tags

Click to add a Name tag


Give it a name and click Next: Configure Security Group

Click Review and Launch


Click Launch

Select Proceed without a key pair

Select “I acknowledge that I will not be able to connect to this instance unless I already know the password built
into this AMI.”

Click Launch Instances


Wait for launch to initiate

When the launch process has started scroll to the bottom of the page and click “View Instances”

After a few minutes, the status of the instance will change to running and status checks will be completed (you
will need to refresh the screen to see any changes).
Viewing your web server

After the Status checks have completed click on the Instance ID to select the instance.

Copy the public IP address of your web server (don’t click on open address).

Paste the IP address in your browser.


Troubleshooting viewing your WordPress application

If you cannot view your website it probably hasn’t finished the launch process completely.

If you navigate to your website and it displays a security message, you have tried to open with https not http.

If after quite some time you still can’t view your website, it may be that your security group does not allow
inbound requests on port 80 (http). The inbound rules should include:

80 tcp 0.0.0.0/0

Scroll down and click on the Security tab


If the rule is not present you will need to add it by clicking on the security group to open it:

Click on the Inbound rules tab

Click on Edit
Add a rule for HTTP and Anywhere

Click Save rules

Finding the Username and Password for your WordPress application

Go back to the EC2 console and select “Monitor and troubleshoot”, “Get System Log”. Do not click on connect.
Scroll up until you find the log entry for the application username and password and copy it.

Go to the admin subdirectory of your website in your browser

Enter Username user and paste in the password


You will now be in the admin section of your WordPress application

Troubleshooting logging in to the WordPress application

If you get the following message:


You have tried to connect to the Linux operating system by clicking on “Connect”. Do not click on connect, select
“Actions – “Instance settings” - “Get System Log” as detailed previously.

Clean up

Select Actions -> Instance State -> Terminate

Make sure you terminate the instance so that you are not billed for it anymore.
Sending Emails with Amazon SES

When you receive your verification email click on the supplied link.

You will then receive a success page


Go back to the SES console page and refresh the information to see the email has been verified
Requesting full access to SES
Creating a Billing Alert with
CloudWatch and SNS

Enabling Billing Alerts


Creating a CloudWatch Alarm
Creating an IAM User
Creating a Highly Available
Architecture with Elastic Beanstalk
Clean Up

You might also like