artem zhurbila 4 aws - s3, glacier, cloud front, rds

26
4 AWS - S3, Glacier, CloudFront, RDS Artem Zhurbila [email protected] [email protected]

Upload: artem-zhurbila

Post on 07-Aug-2015

129 views

Category:

Software


0 download

TRANSCRIPT

4 AWS - S3, Glacier, CloudFront, RDS

Artem Zhurbila

[email protected]@gmail.com

Agenda1. S32. Glacier3. Static site hosting4. CloudFront5. RDS

2

Comparison of storages

Standard S3 Storage Reduced Redundancy

Storage (RSS S3)

Glacier Storage

First 1 TB / month $0.0300 per GB $0.0240 per GB $0.0100 per GB

Next 49 TB / month $0.0295 per GB $0.0236 per GB $0.0100 per GB

Time to retrive data immediately immediately several hours

Durability 99.999999999% 99.99% 99.999999999%

3

S3

- Able to store unlimited number of objects in a bucket- object size from 1 byte to 5tb

4

5

Lifecycle actions

If versioning is enabled you can config more flexible rules:

6

7

S3 SecurityAccess mechanisms:● IAM● Access Control Lists (ACL) - Grantee permissions● Bucket policiesDurability & Availability options:● Calc checksum to detect data corruption● Versioning and Server Side Encryption

8

AWS Cli1. pip install awscli2. complete -C aws_completer aws3. aws configure

AWS Access Key ID [None]: AKIAIXDRLAEIIE6UZX6A

AWS Secret Access Key [None]: *****Default region name [None]: eu-central-1Default output format [None]: json

~/.aws/config~/.aws/credentials

9

S3 CLI● aws s3 ls s3://<bucket_name>● aws s3 cp <local_file> s3://<bucket_name_dest>● aws s3 mv <LocalPath> <S3Path> or

<S3Path> <LocalPath> or <S3Path> <S3Path>

● aws s3 rm s3://<file_path>● aws s3 mb s3://<new_bucket_name>● aws s3 rb s3://<bucket_name>● aws s3 sync <LocalPath> <S3Path>● aws s3 website <S3Path>

Flags: --recursive --region --include --exclude

10

Glacier- low-cost- storage for data archiving and backup- optimized for data that is infrequently

accessed

11

12

Glacier Data Model13

Static site example

2. copy static site to S3 bucket: aws s3 sync output/ s3://devops-by/

14

Static site3. Create new Bucket policy and add read-only rights:{

"Version": "2012-10-17","Statement": [

{"Sid": "StaticSitePerm","Effect": "Allow","Principal": "*","Action": "s3:GetObject","Resource": "arn:aws:s3:::devops-by/*"

}]

}

15

Index page of static site16

CDN with static site17

18

Files are distributed to all AWS edge locations in 15 min.

19

Setup DNS 20

RDS21

22

Multi-AZ Deployments- Amazon RDS automatically creates a primary DB

Instance and synchronously replicates the data to a standby instance in a different Availability Zone (AZ).

- Performs an automatic failover (CNAME record changes from the main DB to the standby).

23

Promote Read Replica- Before you promote Read Replica, we recommend that

you stop any transactions on the master and wait for the Read Replica committed all master transactions.

- Note that the promotion process takes a few minutes to complete.

- When you promote a Read Replica, replication is stopped and the Read Replica is rebooted as part of the promotion.

24

25

26

Artem [email protected]

[email protected]

https://www.linkedin.com/in/zhurbila