SAA Flashcards
What are the rules concerning S3 bucket names?
- They have to be globally unique (no two buckets can have the same name, even if they are created within two different regions, or AWS accounts).
- They have to use DNS name-like rules (only lowercase, can’t have a - in the name, may start with a digit or character).
- Have to be 3-63 characters long.
- Cannot be IP address-like.
EC2 health checks vs. ELB for ASG
- EC2 health checks deal with HOST/INSTANCE issues
- ELB can monitor app health
- ASG using ELB checks detect and replace failed apps/instances
Serverless in AWS
Lambda API Gateway DynamoDB Step Functions S3 SQS/SNS
Max managed IAM policies per group
10
Role permissions policy
Defines what permissions STS gives the identity who assumes a role
What is split view in DNS?
When there are two zones, a private and a public, and they have the same DNS record
Define what a logical resource and a physical resource is within CloudFormation.
A logical resource is the resource defined in code format while the physical resource is the real resource that is actually created in AWS by the logical resource.
Route targets
- Can be IPs
- Can be gateway objects such as IGW, VGW, VPC endpoints, VPC peers, NAT gateways, etc.
How many objects and how much data can S3 store?
S3 can store an unlimited number of objects and an unlimited amount of data.
SQS security
Public service Queue policy (resource policy)
RTO
Recovery Time Objective: How long from the point of failure it will take to recover the system to an operational state
What is RTMP?
Real-Time Messaging Protocol, owned by Adobe. CloudFront has an option to distribute this type of content.
Snowball/Edge/Mobile
- Migrate data to or from S3 faster than you could with an internet connection (high-capacity, suitcase-sized storage).
- Consider when you have high data volume and a bad internet connection.
Bootstrap
- Giving startup commands to an instance
- Configure OS
- Install apps
- Configure apps
- Steps occur after base AMI is installed
- Done via user data for EC2
Route 53 latency
Resolves to record that provides the lowest latency and so ideally best performance
What is the maximum retention period for RDS automatic backups?
35 days
SQS
- Standard or FIFO queues
- 256 KB messages
- Short poll: Queue messages or nothing
- Long poll: Wait for messages (fewer API calls)
Bucket — object versioning
- Can be enabled and paused, not disabled
- Every object gets a version ID
- Deleted objects just have a delete marker added
- Required for CRR
Improving RTO
- Automated recovery
- Automated healing
- Efficient restore processes
VPC Flow Logs
Monitors IP traffic metadata -> S3 or CloudWatch Logs
EMR
- Elastic MapReduce
- Analysis of “big data” (unstructured and semi-structured)
- Cluster (master, core, task)
- HDFS cluster file system
- EMRFS: S3-based cluster file system
What are the types of CloudWatch Events sources?
- Pattern
- Scheduled
Access keys
- Long-term credentials associated with an IAM user
- Give permissions the user has
- Don’t expire
S3 CRR
- Cross-region replication
- Object replication from source bucket to destination bucket in a different region
- Not retroactive; one way only
- DR or read in different region for performance reasons
CloudTrail trail
- Lets you configure what to log
- What regions
- Global events
- Global trail
- Where -> S3 / CloudWatch Logs
Kinesis vs. SQS
- Kinesis for streaming (ingestion)
- Multiple consumers, rolling window, no removals
- SQS decoupling, work queue, one consumer per message
Direct Connect encryption
- No
- Can be added, public VIF + IPSec VPN
What is the only way to restrict the root user?
When utilizing AWS Organizations, you can create a service control policy and attach it to the account OU restricting access.
Internet gateway HA
- It’s HA by design
- You can’t make two for one VPC
- You don’t need to make two for one VPC
- One IGW covers all public subnets in the VPC
- Works with IPv4 and IPv6
What is ::/0?
- Represents all IPv6 addresses
- Generally used for the IPv6 default route
Reserved Instances
- Regional: No capacity reservation, just discount
- Zonal: Discount and capacity reservation
DynamoDB streams
- Ordered record of change to a DynamoDB table; four different view types
- KEYS_ONLY
- NEW_IMAGE
- OLD_IMAGE
- NEW_AND_OLD_IMAGE
Describe alias records.
An extension of CNAME. Can be used like an A record with the functionality of a CNAME and none of the limitations. Can refer to AWS local services, and AWS doesn’t charge for queries of alias records against AWS resources.
What is the benefit of having multiple Availability Zones within a region?
Availability Zones provide isolated infrastructure and services that allow for building highly available, fault-tolerant solutions within the same region.
VPC Flow Logs monitoring points
- VPC
- Subnet
- ENI
CloudWatch Logs components
- Log group: Related data (/var/log/secure) settings, filters, retention
- Log stream: Data for a specific instance or thing
- Filled with log events (date and time; message)
S3 object storage
- Flat structure
- Can’t be mounted as a file system (natively)
- Can be accessed at scale, high performance
- Media/large objects/secure
What can assume roles in IAM?
- IAM users
- AWS services
- External accounts
- Web identities
Types of IP in VPC
- IPv4 internal (inside VPC CIDR)
- IPv4 public (dynamic, it changes when EC2 is stopped and started)
- IPv4 Elastic IP: Static, created and associated with ENI (no change if allocated)
- IPv6: All addresses are public
Route 53 simple
- One record set
- www -> IP
- www -> another name
- domain -> MX
Instance families
- Compute Optimized
- Memory Optimized
- Storage Optimized
- General Purpose
- Accelerated Computing
Private subnet
- Allocate public IP set to false
- No default route to IGW
Groups an IAM user can be a member of
10
What is the maximum time a Lambda function can run?
15 minutes
CloudFront
- Global content delivery network for static and dynamic content
- Accesses one or more origins (S3/custom)
- Caches on edge locations and regional caches
DynamoDB indexes
- Projection: What attributes are in the index
- ALL = same as table
- KEYS = just keys
- Selected: Whatever you want
DynamoDB table
- Per region
- Unique ARN
- PK and (optionally) SK
- Local secondary indexes
- Global secondary Indexes
- Streams
What does CloudWatch Logs do?
- Log ingestions and management
- Log search
- Metric filter
- App and OS logs via agent
Kinesis Data Firehose
- Persistently store data on S3
- Send to other services (Redshift)
- Modify in flight using SQL
VPC interface endpoint
- Used for everything except DDB and S3
- ENIs in VPC
- DNS names for services resolving to endpoints
- Private DNS overrides service default
- No route table changes
S3 permissions
- Identity policies on USERS (same account only)
- ACL on objects and bucket (old style)
- Bucket policy: Applies to anyone accessing bucket (cross-account/public access)
Network sizes
- /32 = 1 IP
- /31 = 2 total addresses: point-to-point links
- /30 = 4 total: 2 usable, 1 network, 1 broadcast
- /29 = 8 total: 6 usable, 1 network, 1 broadcast
- /28 = 16 total: 14 usable, 1 network, 1 broadcast
- /24 = 256 total
- /22 = 1024 total
EBS volume
- gp2: General purpose SSD
- io1: High IO SSD
- st1: Throughput magnetic/mechanical
- sc2: Cold storage, cheap, archival
- Network-attached BLOCK storage
- ONE INSTANCE AT A TIME
- BELONGS TO ONE AZ
ECS
- Elastic Container Service
- EC2 container service
- Or using Fargate (managed server) container service
- Docker containers
True or False: By default, S3 content is stored encrypted.
False
Service control policy
- A permissions boundary for a MEMBER account
- What services an account can use
- What services an account can’t use
How many resources can a CloudFormation template have?
- If additional resources are needed, you can nest and reference other stacks.
Number of access keys per IAM user
2
True or False: Edge locations check the regional cache first before hitting the origin to get an object.
True
What is cost-effectiveness/efficiency?
Choosing the right products/services that have the minimum upfront and ongoing costs
Event-driven
- An architecture where compute isn’t running 24/7/365. Instead, it runs in response to an event.
- S3 upload -> Lambda
- SQS message on queue -> Lambda
- Change to AWS Account -> CloudWatch Events -> Lambda
How are Availability Zones identified?
With a single letter following the region’s code
RPO
Recovery Point Objective: The time between a failure and the last successful backup. How much data you will lose.
Public subnet
- Allocate public IP set to on
- Route table with default route at IGW
- VPC needs an attached IGW
Which AWS product uses stacks, layers, and recipes?
OpsWorks
SQS message lifecycle
- Poll
- Process
- Delete
OR
- Poll
- Process
- Message reappear (visibility timeout)
SQS FIFO queue
- Default 3,000 messages per second; 300 non-batching
- Guaranteed once only
- Guaranteed order
When to use SAML2.0 federation
- Corporate identity store (MS/ADFS)
- Need to get access to AWS resources using those identities
- SAML assertion swapped by STS for temp credentials via
AssumeRoleWithSAML
Static website
- Bucket accessible with HTTP/S
- Requires world-readable permissions
- Can set index/error.html
- Useful to offload static content away from expensive compute servers
What is a volume gateway?
- Presents via iSCSI; block storage (network hard drive like EBS)
- Volume stored: Data is on gateway; snapshots to S3
- Volume cached: Data is on S3; local cache on virtual appliance
- Data is stored in volumes; not accessible directly via S3
Max size encryption/decryption using a CMK
4 KB
Improving RPO
- More regular backups
- Constant backups
What are VPC endpoints?
Gateway objects created within a VPC. They can be used to connect to AWS public services without the need for the VPC to have an attached internet gateway and be public.
What are the two types of application state?
- Stateful (stored on the server)
- Stateless (stored outside of the server)
Describe a DNS TXT record.
Used for descriptive text in a domain. Often used to verify domain ownership.
Which AWS service is a PaaS environment designed for developers to host their code?
Elastic Beanstalk
What are the advantages of asymmetric keys?
- Doesn’t require sharing a common secret; the key holder holds the private key that needs to be kept secret and safe while anyone can have and use the public key to encrypt text that is only intended for the key holder or decrypt text that is created by the key holder
- Therefore, not easy to impersonate the key holder (unless private key is itself compromised)
Sticky sessions
Send incoming connections to the same instance for the duration of the session (LB generates a cookie).
IaaS
- Infrastructure as a Service (e.g., EC2)
- You purchase a VM or an operating system.
Elasticity
- Automation of the provisioning and un-provisioning of resources
- Horizontal scaling
DB types/engines
- Key-value = DDB
- Wide column key-value = DDB
- Document DB = DocumentDB
- Columnar DB = Redshift
- Relational = Aurora/RDS
- Ad-hoc = Athena
AssumeRole
- Not login
- You become the role temporarily
- STS gives you short-term credentials
Step Functions
- Handle long-running tasks involving AWS services and humans
- Can coordinate Lambda
- Decisions/parallel flows
- Serverless via “state machines”
- Like Simple Workflow service (without servers)
- Use it if you need serverless flows longer than 15 minutes
Direct Connect
- Physical 1 or 10 Gbps connection
- Requires BGP
- Public VIF (public services) and private VIF (VPC) run on top
- NOT ENCRYPTED
Instance types
- T3
- T2
- M5
- C3, etc.
- Governs the capabilities (CPU type, mem type, GPU, burst, etc.)
Route 53 geolocation
- Allows resolution to occur to a local area-based record
- Country
- Continent
- Global default
Give five examples of when to use an IAM role.
- Company merger
- Grant access to an AWS service
- Cross-account access
- Web identity federation
- Break-glass–style extra access
AMI
- Amazon Machine Image
- Config container + EBS snapshot(s)
- Base system install
- Custom AMI with prebakes config/applications
- Can be shared and copied between regions
EBS encryption
- EBS encryption uses an AWS/EBS KMS CMK
- EC2 host performs encryption and decryption on data to and from EBS (at-rest encryption)
- Any snapshots are encrypted
- OS is unaware
If you lose your secret access key, can you generate a new one?
No. You will need to create a new access key.
Default max managed policies per role and per user
10
CloudFront regional cache
Larger cache that can hold objects for longer. Can deliver to edge location rather than origin fetch.
Can you edit a launch template or launch configuration?
No
True or False: Read replicas can be Multi-AZ.
True
SSE-S3
- S3 handles keys and encryption/decryption
- S3 admin can always decrypt objects
- AES-256
Route 53 failover
- Primary and secondary
- Primary passes health check = used
- Primary fails health check = secondary used
- Used for HA/maintenance
- S3 backup for website
Load balancer architecture
- Nodes in each subnet
- Nodes have public IP (internet facing) or private (internal)
- Each node gets one/number of nodes percentage of traffic
- Nodes distribute to back-end instances (or just in AZ if cross-zone is disabled)
Instance metadata
- http://169.254.169.254/latest/meta-data/
- It’s where role credentials are taken from
- It’s where cloud-init gets the bootstrap comments from
- It’s where an instance can find out its public IP/DNS
DynamoDB trigger
Lambda function being invoked when records are added to the stream
EBS snapshots
- Stored in S3
- Incremental: First = full; second = change from first
- If volume is encrypted, the SNAP is encrypted
- Can be copied between regions
- Can be used to create new volumes
Athena
- Serverless querying
- Ad-hoc querying
- Billed for data scanned
- Great for a wide range of data formats
- No modification to source data
PaaS
- Platform as a Service (e.g., Elastic Beanstalk)
- You provide code/application; the vendor supplies the environment.
What are roles for?
- Services can assume to get permissions
- External identities can assume to get permissions
- IAM users can assume to get different permissions
- ALL ARE TEMP CREDENTIALS
Multipart upload
- Splits object into X parts; uploads in parallel
- Speed benefit, reliability benefits
- Recommended for 100 MB+
- Required for 5 GB+
- If a part fails, just that part is retried
Trust policy
Defines what can assume a role
Bastion host/jump box
EC2 instance in a public subnet configured to accept connections (usually RDP or SSH). Once connected, can “jump” and access private resources.