artem zhurbila 4 aws - s3, glacier, cloud front, rds
TRANSCRIPT
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 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
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
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