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

Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

Aug 07, 2015

Download

Software

Artem Zhurbila
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

4 AWS - S3, Glacier, CloudFront, RDS

Artem Zhurbila

[email protected]@gmail.com

Page 2: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

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

2

Page 3: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

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

Page 4: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

S3

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

4

Page 5: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

5

Page 6: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

Lifecycle actions

If versioning is enabled you can config more flexible rules:

6

Page 7: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

7

Page 8: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

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

Page 9: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

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

Page 10: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

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

Page 11: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

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

accessed

11

Page 12: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

12

Page 13: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

Glacier Data Model13

Page 14: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

Static site example

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

14

Page 15: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

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

Page 16: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

Index page of static site16

Page 17: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

CDN with static site17

Page 18: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

18

Page 19: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

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

19

Page 20: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

Setup DNS 20

Page 21: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

RDS21

Page 22: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

22

Page 23: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

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

Page 24: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

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

Page 25: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

25

Page 26: Artem Zhurbila 4 aws - s3, glacier, cloud front, rds

26

Artem [email protected]

[email protected]

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