2. Ben Waine
• Worked With
PHP For 5Years
• Worked With
AWS for 3Years
• Software /
Infrastructure
‘Gun For Hire’
Sunday, 5 July 15
3. Signed Up For AWS?
- http://aws.amazon.com/free/
Sunday, 5 July 15
4. Todays Roadmap
1.Working With EC2
2.Automating With Cloud Formation
3. Creating A Cloud Front Distribution
4. Lessons Learnt In The Cloud
5.RDS - Relational Database Service
6. IAM - Mutli user management
7.The PHP SDK
Critical
Extension
Sunday, 5 July 15
13. All The Little Pieces
EC2 RDS S3 Cloud Front
IAM Cloud Formation
Sunday, 5 July 15
14. 1.Use the AWS management console to create a new
IAM account.
http://aws.amazon.com/console/
Exercise 1:
Creating An IAM User
Sunday, 5 July 15
15. 1. Produce an infrastructure capable of hosting a
traditional php web application.
2. Components: Webserver, database, CDN
3.The design should be resilient to failure
4.The design should be secure
Infrastructure Goals
Sunday, 5 July 15
16. 1. Build a simple architecture in the management
console.
2. Install a ‘hello world’ application on a webserver
3. Use Cloud Former to create a Cloud Formation
template
4. Use Cloud Formation to create a new stack
Exercise 2:
Building The Basics
Sunday, 5 July 15
18. 1. Produce an infrastructure capable of hosting a
traditional php web application.
2. Components: Webserver, database, CDN
3.The design should be resilient to failure
4.The design should be secure
Infrastructure Goals
Sunday, 5 July 15
19. 1. Create a custom AMI from the configured server
Exercise 2:
Creating An AMI
Sunday, 5 July 15
20. 1. Produce an infrastructure capable of hosting a
traditional php web application.
2. Components: Webserver, database, CDN
3.The design should be resilient to failure
4.The design should be secure
Infrastructure Goals
Sunday, 5 July 15
22. 1.Add another subnet in another availability zone
2. Swap the single web server for an autoscaling group
of servers, spanning two availability zones
3. Add a load balancer
Exercise 3:
Availability & Redundancy
Sunday, 5 July 15
24. 1. Produce an infrastructure capable of hosting a
traditional php web application.
2. Components: Webserver, database, CDN
3. The design should be resilient to failure
4.The design should be secure
Infrastructure Goals
Sunday, 5 July 15
25. 1. Create two private subnets
2. Create a new autoscaling web group which launches
into the private subnets
3. Create a ‘Bastion’ host and security group
4. Update the webserver security group
Exercise 4: Security
Sunday, 5 July 15
27. 1. Produce an infrastructure capable of hosting a
traditional php web application.
2. Components: Webserver, database, CDN
3. The design should be resilient to failure
4. The design should be secure
Infrastructure Goals
Sunday, 5 July 15
28. 1.Add an additional database security group
2.Create an RDS subnet group
3. Launch An RDS database
Exercise 5:
Create An RDS Database
Sunday, 5 July 15
30. 1. Produce an infrastructure capable of
hosting a traditional php web application.
2. Components: Webserver, database, CDN
3. The design should be resilient to failure
4. The design should be secure
Infrastructure Goals
Sunday, 5 July 15
31. 1. Create an S3 Bucket
2. Modify the buckets access rights
3. Create a cloud front distribution backed by the
bucket
Exercise 6:
Create A Cloud Front
Distribution
Sunday, 5 July 15
33. 1. Produce an infrastructure capable of
hosting a traditional php web application.
2. Components: Webserver, database, CDN
3. The design should be resilient to failure
4. The design should be secure
Infrastructure Goals
Sunday, 5 July 15
36. General Tips
1. Deploy In Multiple AZ’s
2. Deploy Multiple Regions
3.Think Ephemeral
4.Automate Everything
5. Name Everything Consistently
6. Invest Time in Provisioning Software
7.WillYour Customers Accept Cloud?
8.AreYou Legally Compliant?
9. Is It cost effective?
10. Reserved Instances
Sunday, 5 July 15
38. The PHP SDK
1. Install Using Composer
2.Vast majority of features supported
3. Uses Guzzle under the hood
4. Use with IAM for credential-less use in production
Sunday, 5 July 15
39. 1. Use the PHP SDK to create a command line app to
upload images to S3
Exercise 7:The PHP SDK
Sunday, 5 July 15
40. Any running resources could eventually incur usage
costs
Delete all stacks, instances, databases, IP addresses etc.
Final Exercise: Clean Up
Sunday, 5 July 15