AWS Cert Notes

My AWS cert notes.

This project is maintained by jangroth


Developer Associate

6/2017 - 8/2017

AWS Fundamentals

Global infrastructure

Storage overview

Instance store volumes

Elastic Block Storage (EBS)

Elastic File System (EFS)

Amazon Glacier

Database Storage

In-memory caching

Storage gateway

Security Concepts

Services

IAM

IAM is a global service that helps to securely control access to AWS resources.

Policies

	{
		"Version": "2012-10-17",
		"Statement": [
			{
				"Effect": "Allow",
				"Action": "s3:ListAllMyBuckets",
				"Resource": "arn:aws:s3:::*"
			},
			{
				"Effect": "Allow",
				"Action": [
						"s3:ListBucket",
						"s3:GetBucketLocation"
				],
				"Resource": "arn:aws:s3:::productionapp"
			},
			{
				"Effect": "Allow",
				"Action": [
					"s3:GetObject",
					"s3:PutObject",
					"s3:DeleteObject"
				],
				"Resource": "arn:aws:s3:::productionapp/*"
			}
		]
	}

IAM Policies

Limits

. .
Groups per account 100
Instance profiles 100
Roles 500
Server certificates 20
Users 5000

Secure Token Service (STS)

Terms

Scenarios

S3

Amazon Simple Storage Service (S3) is object storage with a simple web service interface to store and retrieve any amount of data from anywhere on the web. It is designed to deliver 11x9 durability and scale past trillions of objects worldwide.

Perfomance & Consistency

Hosting Static Websites

<bucket-name>.s3-website-<AWS-Region>.amazonaws.com

Access Control

Defaults

IAM

Bucket policies

ACLs

How to specify resources in a policy:

. .
arn:partition:service:region:namespace:relative-id arn:aws:s3:::mybucket
arn:aws:s3:::* All buckets and objects in account
arn:aws:s3:::mybucket mybucket
arn:aws:s3:::mybucket/* All objects in mybucket
arn:aws:s3:::mybucket/mykey mykey in mybucket
arn:aws:s3:::mybucket/developers/($aws:username)/ folder matching the accessing user's name

Pre-signed URLs

All objects are private by default. Only the object owner has permission to access these objects. However, the object owner can optionally share objects with others by creating a pre-signed URL, using their own security credentials, to grant time-limited permission to download the objects.

Logging

Versioning

Encryption

Protecting data in transit

Protecting data at rest

Storage classes

. .
S3 Standard Durability 11x9
Availability 4x9
S3 IA (infrequent access) Durability 11x9
Availability 3x9
S3 RRS (reduced redundancy storage) Durability 4x9
Availability 4x9

Request/response headers

Request Response
x-amz-content-sha256 x-amz-delete-marker
x-amz-date x-amz-id-2
x-amz-security-token x-amz-request-id
x-amz-version-id

Error codes

. .
400 Bad Request ExpiredToken
400 Bad Request InvalidToken
400 Bad Request InvalidArgument
400 Bad Request InvalidRequest
400 Bad Request IncompleteBody
400 Bad Request IncompleteDigest
400 Bad Request InvalidBucketName
403 Forbidden AccessDenied
403 Forbidden InvalidAccessKeyId
404 Not Found NoSuchBucket
404 Not Found NoSuchKey
409 Conflict BucketAlreadyExists
409 Conflict BucketNotEmpty

Limits

. .
Buckets per account 100
Bucket policy max size 20KB
Object size 0B to 5TB
Object size in a single PUT 5GB

Dynamo DB

Overview

Core components

Keys and indexes

Partion key (PK)

PK & Sort key

Secondary indexes

Projected attributes

Local secondary index

Global secondary index

Capacity provisioning

. .
. 300 strongly consistent reads of 11KB per minute
Calculate read / writes per second 300r/60s = 5r/s
Multiply with payload factor 5r/s * (11KB/4KB) = 15cu
If eventual consistent, devide by 2 15cu / 2 = 8cu

Query and scan operation

Query

Scan

Atomic and conditional updates

Atomic Counters

Conditional updates

How to grant temporary access

API

Create and manage tables .
CreateTable Creates a table and specifies the primary index used for data access
DescribeTable Returns information such as primary key schema, throughput settings, index information
ListTables Returns the names of all of your tables in a list
UpdateTable Modifies the settings of a table or its indexes
DeleteTable emoves a table and all of its dependent objects
Creating data . conditional?
PutItem Creates a new item, or replaces an old item with a new item yes
BatchWriteItem Puts or deletes multiple items in one or more tables no
Called in a loop it typically checks for unprocesses items and submits a new BWI request for those
Reading data . conditional?
GetItem Returns a set of Attributes for an item that matches the PK no
BatchGetItem Returns the attributes for multiple items from multiple tables using their PKs no
Query Gets one or more items using the table PK, or from a secondary index using the index key no
Scan Gets all items and attributes by performing a full scan across the table or a secondary index no
Updating data . conditional?
UpdateItem Modifies one or more attributes in an item yes
Deleting data . conditional?
DeleteItem Deletes a single item in a table by primary key yes
BatchWriteItem Puts or deletes multiple items in one or more tables no
Called in a loop it typically checks for unprocesses items and submits a new BWI request for those

Limits

. .
Tables per account/region 256
Max read / write per table partition 3000 reads / 1000 writes
Partition key min 1B, max 2048B
Sort key min 1B, max 1024B
Local secondary index per table 5
Global secondary index per table 5
Item size 1B to 400KB, including name & value
Simultaneous CreateTable, UpdateTable, DeleteTable up to 10
Single BatchGetItem Max 100 items, must be <16MB
Single BatchWriteItem Up to 25 PutItem or DeleteItem, must be <16MB
Query and Scan result set limit 1MB data per call

Elastic Compute Cloud (EC2)

Different options

Instance metadata & userdata

API

. .
DescribeImages Describe an Amazon Machine Image
RegisterImage Final process of creating an AMI

Limits:

. .
Elastic IP addresses for EC2-Classic 5

Elastic Load Balancer (ELB)

Limits:

. .
Total load balancers per region (ALB & ELB) 20

SNS

Components

Managing access

Mobile push notifications

API

. .
CreateTopic Create a new topic.
DeleteTopic Delete a topic and all its subscriptions.
Publish Publish a new message to the topic.
ListTopics List of topics owned by a particular user (AWS ID).
ListSubscriptions List subscriptions owned by a particular user (AWS ID)
ListSubscriptionsByTopic List of subscriptions for a particular topic
Subscribe Register a new subscription on a topic, will generate a confirmation message from Amazon SNS
ConfirmSubscription Respond to a confirmation message, confirming to receive notifications from the topic
UnSubscribe Cancel a previously registered subscription

Limits:

. .
Topics per account 100,000

SQS

Core features

Message lifecycle

Long polling vs short polling

API

. .
SendMessage/SendMessageBatch Delivers a message to the specified queue (up to 20, <= 256KB)
ReceiveMessage Retrieves one or more messages (up to 10), WaitTimeSeconds for long poll
ChangeMessageVisibility/ChangeMessageVisibilityBatch Changes the visibility timeout of a message
DeleteMessage/DeleteMessageBatch Deletes the specified message from the specified queue
SetQueueAttribute e.g DelaySeconds, MessageRetentionPeriod
GetQueueURL
CreateQueue
DeleteQueue
ListQueues

Limits:

. .
Max message size 256KB
Max inflight messages 120,000

Cloudformation

Anatomy of template

Intrinsic Functions

Limits:

. .
Max stacks per region 200
Max templates per region unlimited
Parameters 60
Mappings 100
Resources 200
Outputs 60

Elastic Beanstalk (EB)

AWS-Stack

Supports

Core components

Limits:

. .
Applications 75
Application Versions 1000
Environments 200

Simple Workflow Service (SWF)

Core components

Limits:

. .
Maximum registered domains 100

Virtual Private Cloud (VPC)

Overview

Default VPC (Amazon specific)

Non-default VPC (regular VPC)

VPC Peering

VPC Scenarios

Components

Structure & package flow

Security

Network ACL

Security Groups

Limits:

. .
VPCs per region 5
Subnets per VPC 200
Customer gateways per region 50
Gateway per region 5 Internet
Elastic IPs per account per region 5
VPN connections per region 50
Route tables per region 200
Security groups per region 500

Relational Database Service (RDS)

Etc