CH3: EC2 Flashcards
EC2
Secure, resizable compute capacity in the cloud
Elastic Compute Cloud
EC2
EC2
A VM hosted at AWS
Not your own data center
EC2
Designed to make web-scale computing easier for
Developers
EC2
Gives you the capacity that you want
When you need it
EC2
Gives you autonomy with your
Own instances
EC2
You pay for
What you use
EC2
Takes guessing out of capacity management
Grow and shrink capacity as needed
EC2
You can set up and go global in
Minutes
EC2 Instance Types
Offers different compute, memory, and storage capabilities.
Instance Type
EC2 Instance Types
Grouped into
Families
EC2 Instance Types
Select an instance type based on
The requirements of your application.
IOPS -vs- Throughput
Measures the number of read and write operations per second
IOPS
IOPS -vs- Throughput
Important metric for quick transactions, low latency apps and transactional workloads
IOPS
IOPS -vs- Throughput
The ability read and write very quickly
IOPS
IOPS -vs- Throughput
For applications that require greater than 16,000 IOPS use
Provisioned IOPS SSD - (io1 or io2)
IOPS -vs- Throughput
Measures the number of bits read or written per second (MB/s)
Throughput
IOPS -vs- Throughput
Important metric for large datasets, large I/O sizes and complex queries.
Throughput
IOPS -vs- Throughput
The ability to deal with large datasets
Throughput
IOPS -vs- Throughput
For specific requirements and dealing with large amounts of data use
Throughput Optimized
st1
EBS
Highly available and scalable storage volumes you can attach to an EC2 instance
Elastic Block Store
SDD Volumes
EBS - SDD Volume
Suitable for boot disks and general purpose applications
gp2.
General Purpose SSD
EBS - gp2
IOPS up to
16,000 per volume
EBS - gp2
durability
up to 99.9%
EBS - SDD Volume
Suitable for OLTP and latency-sensitive applications.
io1
Provisioned IOPS SSD
EBS - Provisioned IOPS SSD - io1
La Zero
50
EBS - Provisioned IOPS SSD - io1
IOPS
Up to 64,000 per volume
EBS - Provisioned IOPS SSD - io1
High performance and most expensive
Provisioned IOPS SSD
EBS - Provisioned IOPS SSD - io1
Durability
Up to 99.9%
EBS - Provisioned IOPS SSD - io2
Suitable for OLTP and latency sensitive applications
Io2
EBS - Provisioned IOPS SSD - io2
IOPS/Gib
500
EBS - Provisioned IOPS SSD - io2
Up to IOPS per volume
64,000
EBS - Provisioned IOPS SSD - io2
durability
99.999%
5 9s
EBS - Provisioned IOPS SSD - io2
Latest generation
Io2
EBS - HDD Volumes
Highly available and scalable storage volumes you can attach to an EC2 instance
Elastic Block Store - HDD volumes
EBS - HDD - st1
Suitable for Big Data, data warehouses, ETL
Throughput Optimized HDD
EBS - Throughput Optimized HDD
Max throughput per volume
500
EBS - Throughput Optimized HDD
Not suitable as this sort of volume
Boot
EBS - Throughput Optimized HDD
durability
99.9%
EBS - HDD - sc1
Max throughput of 250 Mbs per volume
Cold HDD
EBS - Cold HDD
for data that is
less frequently accessed
EBS - Cold HDD
NOT suitable as this sort of volume
BOOT
EBS - Cold HDD
This one is the lowest
cost
EBS - Cold HDD
durability
99.9%
EBS Snapshot
If you create an EBS volume from and encrypted snapshot, then you have an
Encrypted Volume
EBS Snapshot
If the snapshot is unencrypted, then any volume that you create from it is also going to be
Unencrypted
ELB
HTTP/HTTPS intelligent load balancing that routes requests to a specific web server based on the type of request
Application Load Balancer
ELB
Provides high-performance load balancing for TCP traffic
Network Load Balancer
ELB
The legacy option that supports both HTTP/HTTPS and TCP traffic.
Classic Load Balancer
ELB
If you need the IPv4 address of your end user, look for this header
X-Forwarded-For
ELB
The application is not responding within the timeout period.
Gateway Timeout.
504 Error
CLI
Give users the minimum amount of access required
Least Privilege
CLI
Your users will automatically inherit permissions from this
Group
CLI
Group permissions are assigned using
Policy Documents
CLI
You will see this only once and if you do not save it or delete it it can be regenerated.
Secret Access Key
CLI
Each time you create or regenerate key pairs this will have to be done
Run AWS Configure
CLI
Do not create just one access key and share that with all of your developers If someone leaves the company on bad terms, then you will need to delete the key and create a new one - and everyone would need to update their keys
SO
create one key pair per developer
CLI
CLI is useable on all of the major OS
PC, Mac, Linux
CLI Pagination
If you see errors like “timed out” or errors related to too many results returned
Adjust pagination
EC2_WithS3Role
You can use these to avoid using Access Key IDs and Secret Access Keys
Roles
EC2_WithS3Role
From a security perspective these are a preferred method of access
Roles
EC2_WithS3Role
Roles are controlled by
Policies
EC2_WithS3Role
When you change a policy on a role the effect is
Immediate
EC2_WithS3Role
While running EC2 instances you do this with roles without having to stop the instance,
Attach and Detach them
RDS. - SOMPAM
Six database types in RDS
SQL Server Oracle MySql PostGresSQL Aurora MariaDB
RDS - Non Relational Database
Collection =
Table
RDS - Non Relational Database
Document =
Row
RDS - Non Relational Database
Key Value Pairs =
Fields
RDS NoSQL uses this instead
JSON
RDS
Used for business intelligence and examples are tools like Cognos, Jaspersoft, SQL Server Reporting Services, Oracle Hyperian and SAP NetWeaver.
Data Warehousing
RDS - Data Warehousing
Used to pull in very large and complex data sets - usually used by management to do queries on data
RDS - BOLAP
Used for business and run in data warehouses
Online Analytics Processing
BOLAP
Data Warehousing
RDS
Web service that makes it easy to deploy, operate and scale an in-memory cache in the cloud and improves the performance of web applications by allowing you to retrieve information from fast, managed, in-memory caches, instead of relying entirely on disk-based databases.
Elasticache
RDS - Elasticache Types
MemcacheD
–AND–
Redis
RDS -
An exact copy of your production databases in another AZ
Multi-AZ
RDS
What is the Multi-AZ scenario used for
Disaster Recovery
RDS
How does the Multi-AZ scenario work
In the event of a failure, RDS will automatically failover to the standby instance.
RDS
A read-only copy of your PRIMARY database in the same AZ, cross-AZ or cross-region.
Read Replica
RDS
What is the a Read Replica used for?
To increase or to scale read performance.
RDS
What is a Read Replica great for?
Business intelligence reporting jobs
Read-heavy workloads and takes the load off your primary database for read only workloads
RDS
Automated, enabled by default, you define the backup window
Automated Backup
RDS
Point-in-time snapshot plus transaction logs.
Automated Backup
RDS
Automated Backup retention period
1 - 35 days
RDS
How can an automated backup be used to restore your database within a retention period?
By recovering it to any point of time within the retention period.
RDS
These are user-initiated and ad-hoc
DB Snapshot
RDS
What period of time does a D Snapshot cover
Point-in-time snapshot only
RDS
What is the retention period of a DB Snapshot
None
RDS
What is a use case of a DB-Snapshot
Used to back up your database instance to a known state and restore to that point in time.
IE - before making a change to the database.
RDS - Encryption
Enable encryption at creation to include
all underlying storage, automated backups, snapshots, logs and read replicas.
RDS - Encryption
Uses this service for AWS-256 encryption.
AWS Key Management Service
RDS - Encryption
If you have an unencrypted instance and you need to encrypt it.
Take a snapshot
Encrypt snapshot
Create NEW RDS instance from the encrypted snapshot.
ElastiCache
In-memory, key-value data store types
REDIS
–AND–
MemcacheD
ElastiCache
If object caching is your primary goal
MemcacheD
ElastiCache
You want to keep caching as simple as possible
MemcacheD
ElastiCache
If you are performing data sorting and ranking such as gaming leaderboards
Redis
Red sorting hat
ElastiCache
You have advanced datatypes such as lists and hashes
Redis
ElastiCache
When you need caching to span multi-az or to be persistent
Redis
Parameter Store
The purpose is to store
Confidential Information
Passwords
Database connection strings
License codes
Parameter Store
You can store values as plain text or
They can be encrypted
Parameter Store
You can reference your parameters using
Parameter Name
Bootstrap Script
Parameter Store
Integrates with many AWS services
EC2, CloudFormation, Lambda, CodeBuild, CodePipeline and CodeDeploy.