Solutions Architect Flashcards
IAM users
identity used for anything requiring long-term aws access
Principal
Person or Application that interacts with an IAM through a Request
ARNs(Amazon resource name)
Uniquely identify resources within any AWS accounts
IAM user account limits
5,000 users per account
IAM member limits
Up to 10 groups
IAM groups
containers for users
Groups are not what?
True identities
Can’t be referenced as principal in policy
IAM user
Single principal
IAM role
multiple users. represents a level of access
sts:AssumeRole
IAM Role is involved
Function as a service product
AWS Lambda
Lambda execution role
Lambda service that trusts AWS Lambda
-assumes the sts:AssumeRole and gets tokens for CloudWatch and S3
Break Glass For Key
Emergency Role situation in AWS
Single Sign-on or > 5000 identities
On-premise:
Existing Identities, Active Directory
Off-premise:
external accounts can’t be used directly w/S3
ID Federation
Having a small number of roles to manage and external identities can use these roles to access the AWS resources
Web Identity Federation
Needing millions of users to be authenticated into DynamoDB
Web Identities
No was credentials on the app
Uses existing customer logins
Scales to 100,000,000’s of accounts
Cross-Account Access
Allows an IAM user in one account access resources in another account
i.e.: 1,000’s identities to assume role to get to S3 bucket
AWS Organization
Management Account
SCPs
Service Control Policies:
- They don’t give permissions, are boundaries
- Control what an account CAN/CANNOT do via identity policies
- Appliable to organizations, OU’s, or individual
- Members can be effect, Management accounts can’t
What two policies are assigned to an IAM Role?
Permissions, Trust
Within AWS policies, what is always priority?
Explicit Deny
Which are features of IAM groups?
Admin groupings of IAM users, Can hold identity permissions
Which are true for IAM roles?
Roles can be assumed, When assumed - temporary credentials are generated
What 3 features are provided by AWS organizations?
Consolidated billing
AWS account restrictions using SCP
Account organizations via OU’s
What is CloudTrails functionality?
Account wide auditing and API logging
Is it possible to restrict what account root user can do?
If AWS organizations are used.. but not the management account
Role switching
Assuming role in another AWS account to access the account via console UI
Valid IAM policy types
S3
Private by DEFAULT
S3 Bucket policies
- form of resource policy
- like identity policies, but attached to bucket
- resource perspective permissions
- ALLOW/DENY same or diff accounts
- ALLOW/DENY anonymous principles
Access Control Lists(ACLs)
- In objects and buckets
- subresource
- legacy
- inflexible and simple permissions
Identity
- Controlling different resources
- You have preference for IAM
- Same account
Bucket
- Just controlling S3
- Anonymous OR Cross-Account
ACLs
NEVER, unless you MUST
Normal access for Static Website Hosting
via AWS APIs
Static Website Hosting allows access via
HTTP; blogs
Documents in Static Website Hosting
Index and Error documents are set
Website endpoints created in
Static Web Hosting
Bucketname Matters
Custom Domain via R53 MUST match
S3 offloading hosting
Take all media to static hosting in S3
S3 out-of-band page hosting
Can be accessed via cellular network
-can be used as a backup page in case a web app is down
” * “
Applies to all policies within “Principal”
Object versioning
Default is Disabled
Once enabled, cannot be Disabled, but can be suspended
id = null
Once changed, version id will be updated.
Delete Marker
Hides past versions of an object
MFA Delete
Enabled in versioning configuration
MFA required to change bucket versioning state
Required to delete versions
Serial number (mfa) + code passed w/API calls
Single PUT Upload
Single data streeam to S3
If stream fails, upload fails, and requires full restart
Speed & reliability = limit of 1 stream
Multipart Upload
Data is broken up
Min data size = 100MB for multipart
10,000 max parts, 5mb -> 5gb
Last part can be smaller than 5mb
Parts can fail and be restarted
Transfer rate = speeds of all parts
S3 Transfer Acceleration
When Edge Locations support S3 buckets in remote regions
Encryption at rest
To deter from physical tampering
e.g; password. ‘a very expensive paperweight’
Encryption in transit
Data is encrypted before leaving laptop and upon arrival
Ciphertext
encrypted data
KMS
Keys never leave KMS - Provides FIPS 140-2 (L2)
Regional & Public Service; separate product in each region
Create, store, manage cryptographic keys
Symmetric & Asymmetric keys
Cryptographic operations
- Backing Key ( and previous backing keys)
- Aliases
CMK
Customer Master Key managed by KMS
Logical - ID, date, policy, desc & state
Backed by physical key material; generated or imported
Up to 4kb of data
Isolated to a region & never leave
Support rotation
DEKs (Data Encryption Key)
GenerateDataKey through KMS, works on > 4kb
KMS does not store the DEK beyond generating them
- Plaintext version
- Ciphertext version
- Discard
- Store encrypted key w/data
Key Policies
Key policies ( resource )
Every CMK has one
Key Policies + IAM policies
S3 encryption
Buckets aren’t encrypted, objects are
Client-side encryption
server-side encryption
SSE-C
Server side encryption with customer-provided keys
SSE-S3
Server side encryption with amazon S3-managed keys
- AES256
- Stored persistently, data is at rest
SSE-KMS
Server side encryption w/customer master keys (CMKs) stored in was key management service
Method: Client-Side
Key Management: YOU
Encryption Processing: YOU
Method: SSE-C
Key Management: YOU
Encryption Processing: YOU
Method: SSE-S3
Key Management: S3
Encryption Processing: S3
Method: SSE-KMS
Key Management: S3 & KMS
Encryption Processing: S3
Extras: Rotation Control, Role Separation
Bucket Default Encryption
Bucket header: x-amz-server-side-encryption
S3 standard
S3 storage class
Objects are replicated across 3+ AZs in the AWS region
AZ-A: 99.9% durability for 10mil objects, 1 object loss per 10k years
AZ-B: replication over 3 AZ’s & content-md5 checksums & cyclic redundancy checks (CRCs) used to detect & fix data corruption
S3 standard API
Stored in HTTP/1.1 200 OK response by S3 API endpoint
S3 standard billing
Billed for data stored. No specific retrieval fee, no minimum duration, no minimum size
S3 standard-IA
S3 storage class
Objects are replicated across 3+ AZs in the AWS region
AZ-A: 99.9% durability for 10mil objects, 1 object loss per 10k years
AZ-B: replication over 3 AZ’s & content-md5 checksums & cyclic redundancy checks (CRCs) used to detect & fix data corruption
S3 standard-IA billing
per gig data retrieval fee, overall cost increases
S3 standard-IA need to know
should be used for long-lived data which is important or irreplaceable or data access is infrequent.
Do not: use for small files or temporary data, data that is constantly accessed,
S3 one Zone-IA
- Used for long-lived data (non-critical & replaceable) and where access is infrequent
- Doesn’t provide multi-AZ resilience model of Standard or Standard-IA. 1 used w/in region
- Min duration of 30 days
- Min capacity of 128kb/object
S3 Glacier
Objects cannot be made publicily accessible, requires retrieval process
Data is retrieved to S3 standard-IA temporarily
Expedited(1-5 minutes)
Standard(3-5 hours)
bulk(5-12 hours)
First byte latency = minutes or hours
S3 Glacier Deep Archive
40kb min size
180 Day min Duration
Requires retrieval process
Restore time longer than Glacier
Standard(12 hours)
Bulk(up to 48 hours)
S3 Intelligent Tiering
Tiers: Frequent Access, Infrequent Access, Archive, Deep Archive
(Monitoring & Automated Migration)
- automatically moves objects not accessed for 30 days to low cost infrequent access tier, archive, deep archive
- used for long-lived data, w/changing or unknown patterns
- cost per 1k objects. frequent access tier costs same as S3 standard, infreqent same as Standard-IA.
- Archive/Deep Archive comparable to glacier equivalents
S3 Lifecycle Configuration
Set of Rules
For Bucket or groups of objects
Transaction Actions & Expiration Actions
S3 Lifecycle Configuration - Transitions
S3 Standard
- > S3 STandard-IA
- > S3 Intelligent Tiering
- > S3 One Zone-IA
- > S3 Glacier
- > S3 Glacier Deep Archive
For exam: small object has to remain for min 30 days on S3 standard before to S3 Standard-IA or S3 One Zone-IA
S3 Replication - CRR (Cross-Region Replication)
Source bucket & desination bucket are different regions
S3 Replication - SRR (Same-Region Replication)
Source bucket & destination bucket are same regions
S3 Replication options
- All objects or subset
- Storage class - default is to maintain
- Ownership - default is that they will be owned by the source account
- Replication Time control (RTC): SLA for buckets to be in sync
S3 Replication Considerations for test
- Replication is NOT retroactive & versioning needs to be ON
- One-way replication from source -> destination
- Unencrypted, SSE-S3 & SSE-KMS (w/extra config)
- Source bucket owner needs permissions to objects
- Won’t replicate system events, Glacier or Glacier Deep Archive
- DELETES are NOT replicated (to prevent against malicious deletions)
Why replication?
- SRR (log aggregation
- SRR (PROD and TEST sync)
- SRR (Resilience w/strict sovereignty)
- CRR (Global resilience improvements)
- CRR (latency reduction)
S3 Presigned URL
iamadmin -> 1. Generate presignedURL from Bucket, 2. Bucket sends presignedURL
- GET & PUT operations
- whoever uses presignedURL is using as if they were iamadmin
S3 Presigned URLs Exam
- You can create URL for object you have NO ACCESS TO
- When using URL, permissions match identity that generated it
- Access denied could mean the generating id NEVER had access, or doesn’t know
- Don’t generate w/a role, URL stops working when temporary credentials expire
S3 Select & Glacier Select
- can store objects (up to 5TB)
- You often want to retrieve ENTIRE object
- Retrieving 5TB, takes time, uses %TB
- Filtering at client side doesn’t reduce this
- Service lets you use SQL-like statements
- to select part of object, pre-filtered by S3
- CSV, JSON, Parquet, BZIP2 compression for CSV & JSON