A Brief Introduction to
Amazon Web Services
Organization of this part of the course
- IaaS, therefore is similar to "non-cloud" programming
- We will not repeat concepts mentioned in GAE (e.g., Queues)
- We will go thru basics: registration, billing
- Launching instances, load balancing
- S3, if there will be time
- Next week you will work your self
- The week after you will show me results
Pricing
- For each technology separate billing plan
- Pay for hour, GiB, metric, other unit
- Can differ in dependence of region
- Example: S3, EC2
- We will use free tier
AWS Free Tier
- You can try many products for free
- Registration needed
- Require phone number and credit card number
- They charge 1$ to check the card
- Free for 12 months, there are some limits
- If you need more, you must pay for it
Your should know...
- There are different instance types
- Stop action is different to terminate action more
- Once an instance has been terminated it is lost forever
- Hint: termination protection
- Local data are not persistent
- I.e., only stop and use EBS volumes (may be charged)
- Stop your AMI's if you don't use them, (they have your credit card :-))
- Be careful about additional charges
Your task, part 2 - Running Web Server
- Run a web server on your AMI
- Check you can access default web page
Little Hint..
sudo yum -y update
sudo yum install php
sudo yum install php-mysql
sudo service httpd start
Your task, part 3 - Load Ballancing
- Create another AMI, run web server on it.
- Create a load balancer
- Why load balancer says 0 of 2 instances in service?
- Hint: what does download heathcheck?
- After few minutes try, that it is working
Your task, part 3 - Monitoring
- Monitor your instances via cloudwatch
- Create an alarm, when CPU utilization aggregated across all instances is bigger than 0.5 for more than five minutes
Your task, part 4 - S3 from console
- Have a look into documentation
- In console, create a bucket
- Upload a file
- Try to download a file, manage permissions..., play a bit
Your task, part 4 - S3 from API (part of homework)
- Store files to S3 storage using API (on your computer or EC2 instance)
- You will need to install one of SDK's php, java
- We will probably not finish this.
http://docs.aws.amazon.com/AmazonS3/latest/gsg/GetStartedWithS3.html
Rehersal: if you need...
- Scaling: Load balancer, Alarms, Metrics
- Notifications: SNS
- Communitcation among instances: SQS
- Persistent storage: S3, EBS
- Effectivity: In memory cache
- Database: Relational (e.g, MySQL or Oracle), NoSQL (DynamoDB)
Thank you and see you after two weeks