AWS intro
-
Upload
michael-haberman -
Category
Software
-
view
403 -
download
0
Transcript of AWS intro
![Page 1: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/1.jpg)
AWS introductionMichael Haberman
Freelancer
![Page 2: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/2.jpg)
What we are going to do?
An application Scenario
Before cloud solution
How cloud can help us?
![Page 3: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/3.jpg)
Every cloud talk must start withWhy use cloud?
![Page 4: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/4.jpg)
Before cloud solutions
![Page 5: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/5.jpg)
Registration system
We offer registration infrastructure
That must be highly scalable
The infrastructure has very high load picks
![Page 6: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/6.jpg)
Registration systemFlow:
user authenticates
user send a registration request (once an hour)
application saves it
someone manually accept / reject the request
email is sent
in case of accept - allow print of confirmation (auto generated image)
![Page 7: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/7.jpg)
Solution Architecture
Clients
Web Service
Scale?
![Page 8: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/8.jpg)
Solution Architecture
Clients
Web Service
Web Service
How to balance
the load?
![Page 9: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/9.jpg)
Solution Architecture
Clients
Web Service
Web Service
How to continue scaling?
Load balancer
What happens when the service is
over loading?
![Page 10: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/10.jpg)
Solution Architecture
Clients
Web Service
Web Service
Which machine?
Queue
Who should send
emails?
DB?
![Page 11: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/11.jpg)
Solution Architecture
Clients
Web Service
Web Service
Queue
DB Single DB?
Which machine?
Maybe we need
some cache?
Where to store the images?
![Page 12: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/12.jpg)
Registration system
New requirement:
support Mobile push notification
![Page 13: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/13.jpg)
How does cloud help us?
![Page 14: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/14.jpg)
FeaturesCompute
Storage
Databases
Networking
Mobile support (SNS)
Security
Application Services (Queue, emails, etc…)
Developer Tools (Git, CI)
Management Tools
Analytics
Enterprise Applications
![Page 15: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/15.jpg)
Let’s see the AWS Console
![Page 16: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/16.jpg)
Cloud Solution
Clients
Web Service
Web Service
Queue
DB
Open Issues:DB
(replication)Push
notificationImagesCacheSend Emails
![Page 17: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/17.jpg)
Choosing Database(SQL)
First thought:
EC2 - with a DB Instance
What benefit do we gain by using a cloud base server with DB Instance on it?
![Page 18: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/18.jpg)
Choosing Database(SQL)
EC2 - might not be the first choose for DB
You pay for compute, storage, ram and etc…
Storage is expensive
You have to maintain the DB
Taking responsibility on backups
You have an entire machine only to get a connection string
![Page 19: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/19.jpg)
Choosing Database(SQL)
RDS - Rational Database Services
All you get is a connection string
Auto maintenance
Auto backups
Replication support
Paying for storage (only what you use vs EC2)
Auto address swap in case of failure
![Page 20: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/20.jpg)
DynamoDBSolution for noSQL databases
![Page 21: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/21.jpg)
Cloud Solution
Clients
Web Service
Web Service
Queue
RDS
Open Issues:DB
(replication)Push notificationImagesCacheSend Emails
Auto Scale?
Load balanc
e?
![Page 22: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/22.jpg)
EC2 - Auto ScaleDefine a threshold using CloudWatch
Add instance when event occur
Remove instance when event occur
Define min/max/desired amount of instances
Register for notification (load tests…)
![Page 23: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/23.jpg)
EC2 - Load Balancer
The Auto Scale will create instances upon high loads
The Load Balancer will keep an equal load in the instances
very easy to define
![Page 24: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/24.jpg)
Cloud Solution
Clients
EC2 EC2
Queue
RDS
Open Issues:DB
(replication)Push notificationImagesCacheSend Emails
Load Balancer + Auto Scale
![Page 25: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/25.jpg)
ElasticCacheFew EC2 instance may require high speed data sharing
Distributed cache would solve that
A key value pair
Expiration is supported (once an hour)
When new instance is created - state is easily preserved
![Page 26: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/26.jpg)
ElasticCachevar params = {
ResourceName: 'STRING_VALUE', /* required */
Tags: [ /* required */
{
Key: 'STRING_VALUE',
Value: 'STRING_VALUE'
},]};
elasticache.addTagsToResource(params, function(err, data) {
});
![Page 27: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/27.jpg)
Cloud Solution
Clients
EC2 EC2
Queue
RDS
Open Issues:DB
(replication)Push notificationImagesCacheSend Emails
Load Balancer + Auto Scale
Cloud Front
![Page 28: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/28.jpg)
SQS - Simple Queue Service
Pay as you go
No need for dedicated machine
Simple API
Dead letter queue support
![Page 29: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/29.jpg)
SQS - Enqueuevar params = {
MessageBody: 'STRING_VALUE', /* required */
QueueUrl: 'STRING_VALUE', /* required */
MessageAttributes: {
someKey: {
DataType: 'STRING_VALUE', /* required */
StringValue: 'STRING_VALUE'
},}} ;
sqs.sendMessage(params, function(err, data) {
});
![Page 30: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/30.jpg)
SQS - Dequeuevar params = {
QueueUrl: 'STRING_VALUE', /* required */
NumberOfMessages: 0,
VisibilityTimeout: 0,
WaitTimeSeconds: 0
};
sqs.receiveMessage(params, function(err, data) {
});
![Page 31: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/31.jpg)
Security!
![Page 32: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/32.jpg)
Cloud Solution
Clients
EC2 EC2
SQS
RDS
Open Issues:DB
(replication)Push notificationImagesCacheSend Emails
Load Balancer + Auto Scale
Cloud Front
![Page 33: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/33.jpg)
Cloud Storage Solutions
EC2
high cost
better performance when in the same machine
S3
low cost
distributed between different services
Glacier
low performance - archive Which one would you
use?
![Page 34: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/34.jpg)
S3S3
Separated into buckets
Each item can be up to 5 terabyte
Support event notification (upon item add send email)
Encryption support
![Page 35: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/35.jpg)
S3 - SDKvar params = {
Bucket: 'STRING_VALUE', /* required */
Key: 'STRING_VALUE', /* required */
Body: new Buffer('...') || 'STRING_VALUE' || streamObject,
Expires: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
Metadata: {
someKey: 'STRING_VALUE',
}};
s3.putObject(params, function(err, data) {
});
![Page 36: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/36.jpg)
Cloud Solution
Clients
EC2 EC2
SQS
RDS
Open Issues:DB
(replication)Push notificationImagesCacheSend Emails
Load Balancer + Auto Scale
Cloud Front
S3
![Page 37: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/37.jpg)
Event notification
S3
upon change use SNS, SQS, Lambda events
in our example, send an email. How?
![Page 38: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/38.jpg)
Lamba events
S3
upon change use SNS, SQS, Lambda events
in our example, send an email. How?
![Page 39: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/39.jpg)
Cloud Solution
Clients
EC2 EC2
SQS
RDS
Open Issues:DB (replication)Push
notificationImagesCacheSend Emails
Load Balancer + Auto Scale
Cloud Front
S3LambdaSES
SNS
![Page 40: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/40.jpg)
AWS - endless featureGIT
Deployment
CDN
Monitoring
Analytics
![Page 41: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/41.jpg)
Questions?
![Page 42: AWS intro](https://reader035.fdocuments.in/reader035/viewer/2022070517/58d127841a28abe3298b4765/html5/thumbnails/42.jpg)
Contact Me
Website: www.haberman.io
Email: [email protected]
Twitter: @hab_mic
Blog: http://blogs.microsoft.co.il/michaelh/