AWS Certified Developer - Associate DVA-C02

INTRODUCTION & SCENARIO

Public Introduction (Release DVA-C02) (5:47)

Finding and Using the Course Resources (14:31)

Site tools and features (8:36)

AWS Exams (17:32)

Scenario - Animals4life (13:28)

Connect with other students and your instructor (3:10)

SHARED LESSONS [ALL] [ASSOCIATE] etc

Course Fundamentals and AWS Accounts

AWS Accounts - The Basics (11:33)

[DEMO] ACCOUNTS - STEP1 - Creating GENERAL AWS Account (14:44)

Multi-factor Authentication (MFA) (8:25)

[DEMO] ACCOUNTS - STEP2 - Securing GENERAL AWS Account (9:44)

[DEMO] ACCOUNTS - STEP3 - Creating a Budget (6:46)

[DO_IT_YOURSELF] Creating the Production Account (4:59)

Identity and Access Management (IAM) Basics (13:01)

[DEMO] ACCOUNTS - STEP4 - Adding IAMADMIN to GENERAL Account (12:36)

[DEMO] ACCOUNTS - STEP4 - Adding IAMADMIN to PRODUCTION Account (10:17)

IAM Access Keys (7:10)

[DEMO] Creating Access keys and setting up AWS CLI v2 tools (17:43)

Cloud, Networking and Technical Fundamentals (moved to FREE dedicated course)

TECH FUNDAMENTALS CONTENT (!!PLEASE READ ME!!)

AWS Fundamentals

[ASSOCIATE] AWS Public vs Private Services (7:04)

[ASSOCIATE] AWS Global Infrastructure (14:53)

[ASSOCIATE] AWS Default Virtual Private Cloud (VPC) (15:19)

[ASSOCIATE] Elastic Compute Cloud (EC2) Basics (14:46)

[ASSOCIATE] [DEMO] My First EC2 Instance - PART1 (10:58)

[ASSOCIATE] [DEMO] My First EC2 Instance - PART2 (9:40)

[ASSOCIATE] Simple Storage Service (S3) Basics (15:48)

[ASSOCIATE] [DEMO] My First S3 Bucket (18:34)

[ASSOCIATE] CloudFormation (CFN) Basics (12:28)

[ASSOCIATE] [DEMO] Simple Automation With CloudFormation (CFN) (15:52)

[ASSOCIATE] CloudWatch (CW) basics (13:45)

[ASSOCIATE] [Demo] Simple Monitoring with Cloudwatch (15:31)

[ASSOCIATE] Shared Responsibility Model (6:20)

[ASSOCIATE] High-Availability vs Fault-Tolerance vs Disaster Recovery (17:21)

[ASSOCIATE] Route 53 (R53) Fundamentals (6:29)

[ALL] [DEMO] Registering a Domain with Route 53 (9:49)

[ASSOCIATE] DNS Record Types (13:25)

Section Quiz - Fundamentals

IAM, ACCOUNTS AND AWS ORGANIZATIONS

[ASSOCIATE] IAM Identity Policies (15:52)

[ASSOCIATE] IAM Users and ARNs (13:49)

[ASSOCIATE] [DEMO] Simple Identity Permissions in AWS (16:06)

[ASSOCIATE] IAM Groups (7:48)

[ASSOCIATE] [DEMO] Permissions control using IAM Groups (9:24)

[ASSOCIATE] IAM Roles - The Tech (8:13)

[ASSOCIATE] When to use IAM Roles (15:27)

Service-linked Roles and PassRole (5:16)

[DVA-C02] AWS Security Token Service (6:53)

[ASSOCIATE] AWS Organizations (12:56)

[ALL] [DEMO] AWS Organizations (19:48)

[ASSOCIATE] Service Control Policies (SCP) (12:43)

[ALL] [DEMO] Using Service Control Policies (16:45)

[ASSOCIATE] CloudWatch Logs (7:16)

[ASSOCIATE] CloudTrail (11:40)

[ALL] [DEMO] Implementing an Organizational Trail (18:23)

Section Quiz - IAM and ORGS

SIMPLE STORAGE SERVICE (S3)

[ASSOCIATE] S3 Security (Resource Policies & ACLs) (18:19)

[ASSOCIATE] S3 Static Hosting (10:36)

[ALL] [Demo] Creating a static website with S3 (17:55)

[ASSOCIATE] Object Versioning & MFA Delete (7:56)

[ALL] [DEMO] - S3 Versioning (15:45)

[ASSOCIATE] S3 Performance Optimization (11:42)

[ASSOCIATE] [DEMO] - S3 Performance (5:06)

[ASSOCIATE] Key Management Service (KMS) (18:38)

[ALL] [DEMO] KMS - Encrypting the battle-plans with KMS (12:43)

[ALL] S3 Object Encryption CSE/SSE (23:31)

[ALL] [DEMO] Object Encryption and Role Separation (14:50)

S3 Bucket Keys (5:59)

[ASSOCIATE] S3 Object Storage Classes - PART1 (9:23)

[ASSOCIATE] S3 Object Storage Classes - PART2 (11:41)

[ASSOCIATE] S3 Lifecycle Configuration (8:13)

[202304UPDATE] [ALL] S3 Replication (13:59)

[ALL] [DEMO] Cross-Region Replication of an S3 Static Website (19:52)

[ASSOCIATE] S3 PreSigned URLs (11:11)

[ALL] [DEMO] Creating and using PresignedURLs (18:23)

[ASSOCIATE] S3 Select and Glacier Select (5:32)

[ASSOCIATE] Cross-origin Resource Sharing (CORS) (9:26)

[ASSOCIATE] S3 Events (4:32)

[ASSOCIATE] S3 Access Logs (3:05)

S3 Requester Pays (4:36)

[ASSOCIATE] S3 Object Lock (9:52)

Section Quiz - S3

Security

Policy Interpretation Deep Dive - Example 1 (10:23)

Policy Interpretation Deep Dive - Example 2 (9:11)

Policy Interpretation Deep Dive - Example 3 (10:59)

AWS Permissions Evaluation (10:25)

CloudHSM (14:36)

VIRTUAL PRIVATE CLOUD (VPC) BASICS

[ASSOCIATE] VPC Sizing and Structure - PART1 (11:48)

[ASSOCIATE] VPC Sizing and Structure - PART2 (11:16)

[ALL] Custom VPCs - PART1 - THEORY (10:10)

[ALL] [DEMO] Custom VPCs - PART2 - DEMO (5:40)

[ASSOCIATE] VPC Subnets (10:42)

[ALL] [DEMO] Implement multi-tier VPC subnets (15:24)

[ASSOCIATE] VPC Routing, Internet Gateway & Bastion Hosts (17:35)

[ASSOCIATE] [DEMO] Configuring A4l public subnets and Jump-box - PART1 (13:45)

[ASSOCIATE] [DEMO] Configuring A4l public subnets and Jump-box - PART2 (11:45)

[ASSOCIATE] Stateful vs Stateless Firewalls (14:04)

[ASSOCIATE] Network Access Control Lists (NACLs) (12:38)

[ASSOCIATE] Security Groups (SG) (11:48)

[ASSOCIATE] Network Address Translation (NAT) & NAT Gateway - PART1 (13:43)

[ASSOCIATE] Network Address Translation (NAT) & NAT Gateway - PART2 (11:08)

[ASSOCIATE] [DEMO] Implementing private internet access using NAT Gateways (19:25)

Section Quiz - VPC Basics

ELASTIC COMPUTE CLOUD (EC2) BASICS

[ASSOCIATE] Virtualization 101 (12:27)

[ASSOCIATE] EC2 Architecture and Resilience (12:36)

[ASSOCIATE] EC2 Instance Types - PART1 (11:52)

[ASSOCIATE] EC2 Instance Types - PART2 (8:13)

[ASSOCIATE] [DEMO] EC2 SSH vs EC2 Instance Connect (17:06)

[ASSOCIATE] Storage Refresher (14:16)

[DVA-C02] [ASSOCIATE] Elastic Block Store (EBS) Service Architecture (8:43)

[DVA-C02] [ASSOCIATE] EBS Volume Types - General Purpose (9:23)

[DVA-C02] [ASSOCIATE] EBS Volume Types - Provisioned IOPS (6:15)

[DVA-C02] [ASSOCIATE] EBS Volume Types - HDD-Based (4:32)

[ASSOCIATE] Instance Store Volumes - Architecture (9:00)

[ASSOCIATE] Choosing Between the EC2 Instance Store and EBS (8:49)

[ASSOCIATE] Snapshots, Restore & Fast Snapshot Restore (FSR) (10:55)

[ASSOCIATE] [DEMO] EBS Volumes - PART1 (15:16)

[ASSOCIATE] [DEMO] EBS Volumes - PART2 (14:13)

[ASSOCIATE] [DEMO] EBS Volumes - PART3 (14:27)

[ASSOCIATE] EBS Encryption (8:22)

[ASSOCIATE] Network Interfaces, Instance IPs and DNS (15:58)

[ASSOCIATE] [DEMO] Manual Install of Wordpress on EC2 - PART1 (12:27)

[ASSOCIATE] [DEMO] Manual Install of Wordpress on EC2 - PART2 (12:36)

[ASSOCIATE] Amazon Machine Images (AMI) (13:58)

[ASSOCIATE] [DEMO] Creating an Animals4life AMI - PART1 (9:38)

[ASSOCIATE] [DEMO] Creating an Animals4life AMI - PART2 (10:57)

[ASSOCIATE] [DEMO] Copying & Sharing an AMI (8:35)

EC2 Purchase Options - PART1 (9:22)

EC2 Purchase Options - PART2 (11:56)

Reserved Instances - the rest (11:58)

[ASSOCIATE] Instance Status Checks & Auto Recovery (7:42)

[ASSOCIATE] [DEMO] Shutdown, Terminate & Termination Protection (5:40)

[ASSOCIATE] Horizontal & Vertical Scaling (11:23)

[ASSOCIATE] Instance Metadata [THEORY & DEMO] (15:46)

Section Quiz - EC2 Basics

Monitoring and Logging

CloudWatch Architecture - PART1 (9:44)

CloudWatch Architecture - PART2 (9:19)

CloudWatch Logs Architecture (13:44)

AWS X-Ray (6:20)

[DEMO] Lambda & AWS X-ray (16:28)

[ASSOCIATE] VPC Flow logs (9:56)

Section Quiz - Monitoring and Logging

CONTAINERS, ECS & ECR

[ASSOCIATE] Introduction to Containers (17:13)

[ALL] [DEMO] Creating ‘container of cats’ Docker Image (18:15)

[ASSOCIATE] ECS - Concepts (10:25)

[ASSOCIATE] ECS - Cluster Mode (13:09)

[ALL] [DEMO] - Deploying ‘container of cats’ using Fargate [UI UPDATES IN PROGRESS] (13:13)

[DVA-C02] Elastic Container Registry (ECR) (4:14)

[ALL] Kubernetes 101 (11:27)

[ALL] Elastic Kubernetes Service (EKS) 101 (6:14)

Section Quiz - Containers

Advanced EC2

[ASSOCIATE] Bootstrapping EC2 using User Data (10:25)

[ASSOCIATE] [DEMO] Bootstrapping Wordpress Installation - PART1 (15:00)

[ASSOCIATE] [DEMO] Bootstrapping Wordpress Installation - PART2 (6:45)

[ASSOCIATE] EC2 Instance Roles & Profile (4:18)

[ASSOCIATE] [DEMO] Using EC2 Instance Roles (13:31)

[ASSOCIATE] SSM Parameter Store (6:16)

[ASSOCIATE] [DEMO] Parameter Store (16:11)

[ASSOCIATE] System and Application Logging on EC2 (6:15)

[ASSOCIATE] [DEMO] Logging and Metrics with CloudWatch Agent-PART1 (11:51)

[ASSOCIATE] [DEMO] Logging and Metrics with CloudWatch Agent-PART2 (8:08)

[ASSOCIATE] EC2 Placement Groups (14:29)

[ASSOCIATE] Enhanced Networking & EBS Optimized (6:57)

Section Quiz - Advanced EC2

Infrastructure as Code (CloudFormation)

[ASSOCIATE] CloudFormation Physical & Logical Resources (7:30)

[ASSOCIATE] [DEMO] Simple Non Portable Template - PART1 (10:28)

[ASSOCIATE] [DEMO] Simple Non Portable Template - PART2 (11:28)

[ASSOCIATE] CloudFormation Template and Pseudo Parameters (6:53)

[ASSOCIATE] CloudFormation Intrinsic Functions (14:28)

[ASSOCIATE] CloudFormation Mappings (4:30)

[ASSOCIATE] CloudFormation Outputs (3:37)

[ASSOCIATE] [DEMO] Template v2 - Portable (13:34)

[ASSOCIATE] CloudFormation Conditions (7:24)

[ASSOCIATE] CloudFormation DependsOn (7:14)

[ASSOCIATE] CloudFormation Wait Conditions & cfn-signal (11:52)

[ASSOCIATE] CloudFormation Nested Stacks (13:55)

[ASSOCIATE] CloudFormation Cross-Stack References (10:05)

[ASSOCIATE] CloudFormation Stack Sets (9:12)

[ASSOCIATE] CloudFormation Deletion Policy (5:24)

[ASSOCIATE] CloudFormation Stack Roles (6:47)

[ASSOCIATE] CloudFormation Init (CFN-INIT) (8:48)

[ASSOCIATE] CloudFormation cfn-hup (4:13)

[ASSOCIATE] [DEMO] wait conditions, cfn-signal, cfn-init and cfn-hup - PART1 (12:51)

[ASSOCIATE] [DEMO] wait conditions, cfn-signal, cfn-init and cfn-hup - PART2 (14:42)

[ASSOCIATE] CloudFormation ChangeSets (11:03)

[ASSOCIATE] CloudFormation Custom Resources (11:03)

[ASSOCIATE] [DEMO] CloudFormation Custom Resources-PART1 (9:12)

[ASSOCIATE] [DEMO] CloudFormation Custom Resources-PART2 (13:27)

Section Quiz - CloudFormation

Global Service Discovery and Content Delivery (R53 and CloudFront)

[ASSOCIATE] R53 Public Hosted Zones (6:28)

[ASSOCIATE] R53 Private Hosted Zones (5:10)

[ASSOCIATE] CNAME vs R53 Alias (5:19)

[ASSOCIATE] Simple Routing (2:17)

[ASSOCIATE] R53 Health Checks (12:41)

[ASSOCIATE] Failover Routing (1:53)

[ALL] [DEMO] Using R53 and Failover Routing-PART1 (16:41)

[ALL] [DEMO] Using R53 and Failover Routing-PART2 (6:28)

[ASSOCIATE] Multi Value Routing (2:32)

[ASSOCIATE] Weighted Routing (3:24)

[ASSOCIATE] Latency Routing (2:44)

[ASSOCIATE] Geo-location Routing (5:02)

[ASSOCIATE] Geo-proximity Routing (4:50)

[ASSOCIATE] R53 Interoperability (11:50)

[ALL] CloudFront - Architecture (14:56)

[ALL] CloudFront (CF) - Behaviors (9:21)

[ALL] CloudFront - TTL and Invalidations (13:48)

[ALL] CloudFront - SSL/TLS (14:59)

[ALL] CloudFront (CF) - Origin Types & Origin Architecture (10:20)

AWS Certificate Manager (ACM) (11:21)

[ALL] [DEMO] CloudFront (CF) - Adding a CDN to a static Website-PART1 (16:23)

[ALL] [DEMO] CloudFront (CF) - Adding a CDN to a static Website-PART2 (12:24)

[ALL] [DEMO] CloudFront (CF) - Adding an Alternate CNAME and SSL (11:12)

[ALL] CloudFront - Security - OAI & Custom Origins (8:50)

[ALL] [DEMO] CloudFront (CF) - Using Origin Access Control (OAC) (new version of OAI) (11:21)

[ALL] CloudFront - Security - Private Distributions (7:49)

[ALL] CloudFront - Geo-Restriction (9:40)

[ALL] CloudFront - Field Level Encryption (9:00)

[ALL] CloudFront - lambda@edge (8:03)

Section Quiz - R53 and CDN

DATABASES (SQL)

[ASSOCIATE] Database Refresher & MODELS - PART1 (8:51)

[ASSOCIATE] Database Refresher & MODELS - PART2 (14:45)

[ASSOCIATE] Databases on EC2 (13:08)

[ASSOCIATE] [DEMO] Splitting Wordpress Monolith => APP & DB (18:01)

[ASSOCIATE] Relational Database Service (RDS) Architecture (11:39)

[ASSOCIATE] [DEMO] Migrating EC2 DB into RDS - PART1 (18:20)

[ASSOCIATE] [DEMO] Migrating EC2 DB into RDS - PART2 (12:58)

[ASSOCIATE] Relational Database Service (RDS) MultiAZ - Instance and Cluster (11:54)

[ASSOCIATE] RDS Automatic Backup, RDS Snapshots and Restore (8:52)

[ASSOCIATE] RDS Read-Replicas (6:36)

[ASSOCIATE] [DEMO] MultiAZ & Snapshot Restore with RDS - PART1 (14:05)

[ASSOCIATE] [DEMO] MultiAZ & Snapshot Restore with RDS - PART2 (12:07)

[ASSOCIATE] RDS Data Security (7:03)

[DVA-C02] [ASSOCIATE] Aurora Architecture (13:44)

[ASSOCIATE] Aurora Serverless (9:52)

[DEMO] Migrating to Aurora Serverless [DON’T DO THIS DEMO, IT WON’T WORK, UPDATING to SERVERLESSv2] (14:47)

[ASSOCIATE] Secrets Manager (7:44)

Section Quiz - RDS

Advanced Storage

[DVA-C02] [ASSOCIATE] EFS Architecture (9:05)

[ASSOCIATE] [DEMO] Implementing EFS - PART1 (8:51)

[ASSOCIATE] [DEMO] Implementing EFS - PART2 (11:32)

[ASSOCIATE] [ DEMO] Using EFS with Wordpress (16:00)

FSx for Windows File Server (11:32)

FSx for Lustre (13:57)

Section Quiz - Advanced Storage

Scaling, Load Balancing & High-Availability

[ASSOCIATE] Regional and Global AWS Architecture (10:42)

[ASSOCIATE] Evolution of the Elastic Load Balancer (4:10)

[ALL] Elastic Load Balancer Architecture - PART1 (10:18)

[ASSOCIATE] Elastic Load Balancer Architecture - PART2 (12:49)

[ALL] Application Load balancing (ALB) vs Network Load Balancing (NLB) (16:20)

[ASSOCIATE] Launch Configuration and Templates (4:00)

[ASSOCIATE] Auto-Scaling Groups (16:01)

[ASSOCIATE] ASG Lifecycle Hooks (4:41)

[ASSOCIATE] ASG HealthCheck Comparison - EC2 vs ELB (3:38)

[ADVANCED_DEMO] Architecture Evolution - STAGE1 - PART1 (14:24)

[ADVANCED_DEMO] Architecture Evolution - STAGE1 - PART2 (10:43)

[ADVANCED_DEMO] Architecture Evolution - STAGE2 (12:58)

[ADVANCED_DEMO] Architecture Evolution - STAGE3 (19:30)

[ADVANCED_DEMO] Architecture Evolution - STAGE4 (18:04)

[ADVANCED_DEMO] Architecture Evolution - STAGE 5 - PART1 (11:31)

[ADVANCED_DEMO] Architecture Evolution - STAGE 5 - PART2 (14:56)

[ADVANCED_DEMO] Architecture Evolution - STAGE6 (5:48)

Section Quiz - HA & SCALING

AWS CLI, DEVELOPER TOOLS & CI/CD (CODE)

CI/CD using AWS Code (14:54)

AWS CodeCommit (11:35)

AWS CodePipeline for Developers (4:08)

AWS CodeBuild for Developers (6:23)

AWS CodeDeploy for Developers (10:21)

Elastic Container Registry (ECR) - Architecture (4:14)

[DVA-C02] [ADVANCED_DEMO] - CatPipeline - STAGE0 - INTRO (2:23)

[DVA-C02] [ADVANCED_DEMO] - CatPipeline - STAGE1 - CodeCommit (12:31)

[DVA-C02] [ADVANCED_DEMO] - CatPipeline - STAGE2 - Build a Docker Image w/ CodeBuild - PART1 (13:40)

[DVA-C02] [ADVANCED_DEMO] - CatPipeline - STAGE2 - Build a Docker Image w/ CodeBuild - PART2 (15:02)

[DVA-C02] [ADVANCED_DEMO] - CatPipeline - STAGE3 - Joining the dots - pipeline (15:31)

[DVA-C02] [ADVANCED_DEMO] - CatPipeline - STAGE4 - Deploy our Container w/ CodeDeploy - PART1 (11:29)

[DVA-C02] [ADVANCED_DEMO] - CatPipeline - STAGE4 - Deploy our Container w/ CodeDeploy - PART2 (7:42)

[DVA-C02] [ADVANCED_DEMO] - CatPipeline - STAGE5 - CLEANUP (4:07)

Section Quiz - CI/CD

Application Services, Event-Driven & Serverless

[ASSOCIATE] Architecture Deep Dive - PART1 (8:52)

[ASSOCIATE] Architecture Deep Dive - PART2 (13:09)

[ALL] AWS Lambda - PART1 (11:25)

[ALL] AWS Lambda - PART2 (13:59)

[ALL] AWS Lambda - PART3 (17:03)

[ASSOCIATE] EventBridge (6:54)

[ASSOCIATE] [DEMO] Automated EC2 Control using Lambda and Events - PART1 (13:44)

[ASSOCIATE] [DEMO] Automated EC2 Control using Lambda and Events - PART2 (18:49)

[ASSOCIATE] Simple Notification Service (7:49)

[ASSOCIATE] Simple Queue Service (15:30)

SQS Standard vs FIFO Queues (3:29)

SQS Extended Client Library (2:52)

SQS Delay Queues (4:38)

SQS Dead-Letter Queues (4:17)

[ASSOCIATE] Step Functions (16:09)

[ALL] API Gateway 101 (16:27)

[MINI_PROJECT] Build A Serverless App - Pet-Cuddle-o-Tron - PART1 [UI UPDATES IN PROGRESS] (5:01)

[MINI_PROJECT] Build A Serverless App - Pet-Cuddle-o-Tron - PART2 [UI UPDATES IN PROGRESS] (8:24)

[MINI_PROJECT] Build A Serverless App - Pet-Cuddle-o-Tron - PART3 [UI UPDATES IN PROGRESS] (12:31)

[MINI_PROJECT] Build A Serverless App - Pet-Cuddle-o-Tron - PART4 [UI UPDATES IN PROGRESS] (13:31)

[MINI_PROJECT] Build A Serverless App - Pet-Cuddle-o-Tron - PART5 [UI UPDATES IN PROGRESS] (12:55)

[MINI_PROJECT] Build A Serverless App - Pet-Cuddle-o-Tron - PART6 [UI UPDATES IN PROGRESS] (2:39)

[ASSOCIATE] Kinesis Data Streams (7:52)

[ASSOCIATE] Kinesis Data Firehose (9:11)

[ASSOCIATE] Kinesis Data Analytics (8:51)

[ASSOCIATE] Amazon Cognito - User and Identity Pools (14:44)

[MINI_PROJECT] Implementing Web Identity Federation (WEB-IDF) - PART1 (7:28)

[MINI_PROJECT] Implementing Web Identity Federation (WEB-IDF) - PART2 (7:16)

[MINI_PROJECT] Implementing Web Identity Federation (WEB-IDF) - PART3 (8:16)

[MINI_PROJECT] Implementing Web Identity Federation (WEB-IDF) - PART4 (12:10)

[MINI_PROJECT] Implementing Web Identity Federation (WEB-IDF) - PART5 (2:31)

Serverless and App Services Section Quiz

AWS Lambda In-Depth

Lambda Handler Architecture & Overview - PART1 - Theory (7:52)

Lambda Handler Architecture & Overview - PART2 - Walkthrough (10:07)

Lambda Versions (4:58)

Lambda Aliases (4:11)

[DEMO] Lambda - Aliases and Versions (13:10)

Lambda Environment Variables (7:20)

Monitoring & Logging & Tracing Lambda Based Applications (13:24)

[DEMO] Accessing Private VPC Resources using Lambda w/ TheCatAPI!!!! - PART1 (7:53)

[DEMO] Accessing Private VPC Resources using Lambda w/ TheCatAPI!!!! - PART2 (16:19)

Lambda Layers (8:29)

Lambda Container Images (4:14)

Lambda & ALB Integration (5:21)

Lambda Resource Policy (9:52)

Section Quiz - Lambda

APIs & API Gateway In-Depth

API Gateway - Methods and Resources (4:28)

API Gateway - [DEMO] Methods and Resources (17:04)

API Gateway - Integrations (14:02)

API Gateway Stages and Deployments (6:25)

Open API & Swagger (7:56)

[DVA-C02] [DVA_DEMO] API Gateway Integrations - Mock, Lambda, AWS Service (23:55)

Section Quiz - API Gateway

NoSQL Databases & DynamoDB

[ASSOCIATE] DynamoDB Architecture Basics (10:49)

[ASSOCIATE] DynamoDB Operations, Consistency and Performance - PART1 (13:06)

[ASSOCIATE] DynamoDB Operations, Consistency and Performance - PART2 (11:24)

[ASSOCIATE] DynamoDB Indexes (LSI and GSI) (12:35)

[ASSOCIATE] DynamoDB Streams and Triggers (9:10)

[DVA-C02] [DEMO] DynamoDB Triggers using Lambda (16:54)

[ASSOCIATE] DynamoDB Accelerator (DAX) (10:58)

[ASSOCIATE] DynamoDB Global Tables (5:09)

DynamoDB Time-To-Live (TTL) (4:49)

ElastiCache Theory & Architecture (12:51)

[DVA-C02] Athena 101 (8:19)

[DVA-C02] [DEMO] Athena and large Datasets - PART1 (13:31)

[DVA-C02] [DEMO] Athena and large Datasets - PART2 (11:37)

Section Quiz - NoSQL

Elastic Beanstalk In-Depth

[ASSOCIATE] Elastic Beanstalk (EB) - Architecture (18:12)

[ASSOCIATE] [DEMO] Elastic Beanstalk (EB) - Application & Environment - PART1 (11:50)

[ASSOCIATE] [DEMO] Elastic Beanstalk (EB) - Add additional environment and config options - PART2 (10:53)

[ASSOCIATE] Elastic Beanstalk (EB) - Deployment Policies (11:40)

[ASSOCIATE] [DEMO] Elastic Beanstalk (EB) - Deployment (8:30)

[ASSOCIATE] Elastic Beanstalk (EB) - Environments and RDS (4:34)

[ASSOCIATE] Elastic Beanstalk (EB) - Advanced Customization via .ebextensions (4:52)

[ASSOCIATE] Elastic Beanstalk (EB) - HTTPS (1:51)

[ASSOCIATE] Elastic Beanstalk (EB) - Cloning (4:44)

[ASSOCIATE] Elastic Beanstalk (EB) - Docker (9:11)

[ASSOCIATE] [DEMO] Elastic Beanstalk (EB) - Section Cleanup (1:40)

Section Quiz - Elastic Beanstalk

Exam Prep

[ALL] General AWS Exam Technique - 3 Phase Approach (8:56)

[ALL] General AWS Question Technique - PART1 (14:12)

[ALL] General AWS Question Technique - PART2 (9:01)

Exam Question #1 - Review (8:58)

Exam Question #2 - Review (8:10)

Practice Quiz #1

Finishing Up

Thanks! and a favour (3:15)

INTRODUCTION & SCENARIO

Public Introduction (Release DVA-C02) (5:47)

Finding and Using the Course Resources (14:31)

Site tools and features (8:36)

AWS Exams (17:32)

Alt text AWS Certifications - Foundational - Associate - Professional - Specialty

Alt text AWS Certifications - Role-based vs Specialty

Alt text AWS Certifications - Knowledge Pool

Alt text AWS Certifications - Path

Scenario - Animals4life (13:28)

Alt text Animals4life - Global Corp

Alt text Animals4life - Current Infrastructure

Alt text Animals4life - Global Architecture

Alt text Animals4life - Current Problems

Alt text Animals4life - Ideal Outcomes

Connect with other students and your instructor (3:10)

SHARED LESSONS [ALL] [ASSOCIATE] etc

Course Fundamentals and AWS Accounts

AWS Accounts - The Basics (11:33)

Alt text AWS Accounts: container for identities (users) and resources

[DEMO] ACCOUNTS - STEP1 - Creating GENERAL AWS Account (14:44)

Alt text

Alt text

Multi-factor Authentication (MFA) (8:25)

Alt text MFA: Know, Have, Are, Where

Alt text MFA: MFA App

[DEMO] ACCOUNTS - STEP2 - Securing GENERAL AWS Account (9:44)

Alt text

Alt text

Alt text

Alt text

Alt text

Alt text

[DEMO] ACCOUNTS - STEP3 - Creating a Budget (6:46)

Alt text

Alt text

[DO_IT_YOURSELF] Creating the Production Account (4:59)

Identity and Access Management (IAM) Basics (13:01)

Alt text IAM - Why?

Alt text IAM - Full Trust of AWS Account

Alt text IAM: User - Group - Role & IAM Policy

Alt text IAM: What it does?

Alt text IAM: Summary

[DEMO] ACCOUNTS - STEP4 - Adding IAMADMIN to GENERAL Account (12:36)

[DEMO] ACCOUNTS - STEP4 - Adding IAMADMIN to PRODUCTION Account (10:17)

IAM Access Keys (7:10)

Alt text IAM Access Keys: Long-Term Credentials

Alt text IAM Access Keys: An IAM user can have 2 access keys, which can be created, deleted, made inactive/active

Alt text IAM Access Keys: Example

[DEMO] Creating Access keys and setting up AWS CLI v2 tools (17:43)

Cloud, Networking and Technical Fundamentals (TECH FUNDAMENTALS - Course)

OSI 7-Layer Networking Model

OSI Model Introduction (4:46)

Layer 1 - Physical (10:00)

Layer 3 - Network - PART1 (12:06)

Layer 3 - Network - PART2 (19:13)

Layer 3 - Network - PART3 (15:15)

Layer 4&5 - Transport & Session - PART1 (15:39)

Layer 4&5 - Transport & Session - PART2 (13:54)

Other Networking

Network Address Translation (NAT) - PART1 (11:00)

Network Address Translation (NAT) - PART2 (9:38)

IP Address Space & Subnetting - PART1 (14:37)

IP Address Space & Subnetting - PART2 (10:32)

Distributed Denial of Service (DDOS) Attacks (14:35)

VLANs, TRUNKS & QinQ (16:14)

Decimal to Binary Conversion (IP Addressing) (17:12)

SSL & TLS (11:19)

Border Gateway Protocol (BGP) 101 (17:03)

Stateful vs Stateless Firewalls (14:04)

JumboFrames (4:35)

Layer 7 Firewalls (7:44)

IP Sec VPN Fundamentals (14:48)

Fibre Optic Cable 101 (11:21)

Security

Encryption 101 - PART1 (13:56)

Encryption 101 - PART2 (6:42)

Envelope Encryption (8:06)

Hardware Security Modules (HSMs) (6:40)

Hash Functions & Hashing (13:19)

Digital Signatures (9:26)

DNS & DNSSEC

DNS #1 - What does DNS do (2:56)

DNS #2 - Why does DNS need a complex architecture (13:19)

DNS #3 - How DNS actually works … walking the tree (8:46)

DNS #4 - What happens when a domain is registered? (4:27)

DNSSEC #1 - Why do we need DNSSEC (11:08)

DNSSEC #2 - How DNSSEC Works within a Zone (17:34)

DNSSEC #3 - DNSSEC Chain of Trust (8:16)

DNSSEC #4 - DNSSEC Root Signing Ceremony (7:53)

Containers & Virtualization

Kubernetes 101 (11:27)

Backups & DR

Recovery Point Objective (RPO) & Recovery Time Objective (RTO) (16:54)

Data Formats & Configuration Formats

YAML aint markup language (YAML) 101 (6:12)

Javascript Object Notation (JSON) 101 (4:25)

Cloud Computing 101

What is Cloud Computing? (13:30)

Public vs Private vs Multi vs Hybrid Cloud .. (8:38)

Cloud Service Models (IAAS, PAAS, SAAS) (10:25)

AWS Fundamentals

[ASSOCIATE] AWS Public vs Private Services (7:04)

[ASSOCIATE] AWS Global Infrastructure (14:53)

[ASSOCIATE] AWS Default Virtual Private Cloud (VPC) (15:19)

[ASSOCIATE] Elastic Compute Cloud (EC2) Basics (14:46)

[ASSOCIATE] [DEMO] My First EC2 Instance - PART1 (10:58)

[ASSOCIATE] [DEMO] My First EC2 Instance - PART2 (9:40)

[ASSOCIATE] Simple Storage Service (S3) Basics (15:48)

[ASSOCIATE] [DEMO] My First S3 Bucket (18:34)

[ASSOCIATE] CloudFormation (CFN) Basics (12:28)

[ASSOCIATE] [DEMO] Simple Automation With CloudFormation (CFN) (15:52)

[ASSOCIATE] CloudWatch (CW) basics (13:45)

[ASSOCIATE] [Demo] Simple Monitoring with Cloudwatch (15:31)

[ASSOCIATE] Shared Responsibility Model (6:20)

[ASSOCIATE] High-Availability vs Fault-Tolerance vs Disaster Recovery (17:21)

[ASSOCIATE] Route 53 (R53) Fundamentals (6:29)

[ALL] [DEMO] Registering a Domain with Route 53 (9:49)

[ASSOCIATE] DNS Record Types (13:25)

Section Quiz - Fundamentals

IAM, ACCOUNTS AND AWS ORGANIZATIONS

[ASSOCIATE] IAM Identity Policies (15:52)

[ASSOCIATE] IAM Users and ARNs (13:49)

[ASSOCIATE] [DEMO] Simple Identity Permissions in AWS (16:06)

[ASSOCIATE] IAM Groups (7:48)

[ASSOCIATE] [DEMO] Permissions control using IAM Groups (9:24)

[ASSOCIATE] IAM Roles - The Tech (8:13)

[ASSOCIATE] When to use IAM Roles (15:27)

Service-linked Roles and PassRole (5:16)

[DVA-C02] AWS Security Token Service (STS) (6:53)

Alt text STS - Overview

Alt text STS - How it works?

[ASSOCIATE] AWS Organizations (12:56)

[ALL] [DEMO] AWS Organizations (19:48)

[ASSOCIATE] Service Control Policies (SCP) (12:43)

[ALL] [DEMO] Using Service Control Policies (16:45)

[ASSOCIATE] CloudWatch Logs (7:16)

[ASSOCIATE] CloudTrail (11:40)

[ALL] [DEMO] Implementing an Organizational Trail (18:23)

Section Quiz - IAM and ORGS

SIMPLE STORAGE SERVICE (S3)

[ASSOCIATE] S3 Security (Resource Policies & ACLs) (18:19)

[ASSOCIATE] S3 Static Hosting (10:36)

[ALL] [Demo] Creating a static website with S3 (17:55)

[ASSOCIATE] Object Versioning & MFA Delete (7:56)

[ALL] [DEMO] - S3 Versioning (15:45)

[ASSOCIATE] S3 Performance Optimization (11:42)

[ASSOCIATE] [DEMO] - S3 Performance (5:06)

[ASSOCIATE] Key Management Service (KMS) (18:38)

[ALL] [DEMO] KMS - Encrypting the battle-plans with KMS (12:43)

[ALL] S3 Object Encryption CSE/SSE (23:31)

[ALL] [DEMO] Object Encryption and Role Separation (14:50)

S3 Bucket Keys (5:59)

[ASSOCIATE] S3 Object Storage Classes - PART1 (9:23)

[ASSOCIATE] S3 Object Storage Classes - PART2 (11:41)

[ASSOCIATE] S3 Lifecycle Configuration (8:13)

[202304UPDATE] [ALL] S3 Replication (13:59)

[ALL] [DEMO] Cross-Region Replication of an S3 Static Website (19:52)

[ASSOCIATE] S3 PreSigned URLs (11:11)

[ALL] [DEMO] Creating and using PresignedURLs (18:23)

[ASSOCIATE] S3 Select and Glacier Select (5:32)

[ASSOCIATE] Cross-origin Resource Sharing (CORS) (9:26)

Alt text CORS: Same Origin vs Cross Origin

What is CORS?

Cross-Origin Resource Sharing (CORS):

  • an HTTP-header based mechanism that
    • allows a server to indicate any origins (domain, scheme, or port) other than its own
    • from which a browser should permit loading resources.

CORS also relies on a mechanism by which

  • browsers make a “preflight” request to the server hosting the cross-origin resource,

    • in order to check that the server will permit the actual request.

      Access-Control-Request-Method: POST
      Access-Control-Request-Headers: X-PINGOTHER, Content-Type
      
    • the server response

      Access-Control-Allow-Origin: https://foo.example
      Access-Control-Allow-Methods: POST, GET, OPTIONS
      Access-Control-Allow-Headers: X-PINGOTHER, Content-Type
      Access-Control-Max-Age: 86400
      

Alt text CORS Configuration on the Cross-Origin

Alt text CORS: Simple Request & Preflight Request

[ASSOCIATE] S3 Events (4:32)

[ASSOCIATE] S3 Access Logs (3:05)

S3 Requester Pays (4:36)

Alt text S3 Requester Pays: Requester pays for the requests and data transfer out from the bucket

[ASSOCIATE] S3 Object Lock (9:52)

Section Quiz - S3

Security

Policy Interpretation Deep Dive - Example 1 (10:23)

Policy Interpretation Deep Dive - Example 2 (9:11)

Policy Interpretation Deep Dive - Example 3 (10:59)

AWS Permissions Evaluation (10:25)

Alt text Policy Evaluation Logic - Same Account

Alt text Policy Evaluation Logic - Different Accounts

CloudHSM (14:36)

VIRTUAL PRIVATE CLOUD (VPC) BASICS

[ASSOCIATE] VPC Sizing and Structure - PART1 (11:48)

[ASSOCIATE] VPC Sizing and Structure - PART2 (11:16)

[ALL] Custom VPCs - PART1 - THEORY (10:10)

[ALL] [DEMO] Custom VPCs - PART2 - DEMO (5:40)

[ASSOCIATE] VPC Subnets (10:42)

[ALL] [DEMO] Implement multi-tier VPC subnets (15:24)

[ASSOCIATE] VPC Routing, Internet Gateway & Bastion Hosts (17:35)

[ASSOCIATE] [DEMO] Configuring A4l public subnets and Jump-box - PART1 (13:45)

[ASSOCIATE] [DEMO] Configuring A4l public subnets and Jump-box - PART2 (11:45)

[ASSOCIATE] Stateful vs Stateless Firewalls (14:04)

[ASSOCIATE] Network Access Control Lists (NACLs) (12:38)

[ASSOCIATE] Security Groups (SG) (11:48)

[ASSOCIATE] Network Address Translation (NAT) & NAT Gateway - PART1 (13:43)

[ASSOCIATE] Network Address Translation (NAT) & NAT Gateway - PART2 (11:08)

[ASSOCIATE] [DEMO] Implementing private internet access using NAT Gateways (19:25)

ELASTIC COMPUTE CLOUD (EC2) BASICS

[ASSOCIATE] Virtualization 101 (12:27)

[ASSOCIATE] EC2 Architecture and Resilience (12:36)

[ASSOCIATE] EC2 Instance Types - PART1 (11:52)

[ASSOCIATE] EC2 Instance Types - PART2 (8:13)

[ASSOCIATE] [DEMO] EC2 SSH vs EC2 Instance Connect (17:06)

[ASSOCIATE] Storage Refresher (14:16)

[DVA-C02] [ASSOCIATE] Elastic Block Store (EBS) Service Architecture (8:43)

[DVA-C02] [ASSOCIATE] EBS Volume Types - General Purpose (9:23)

[DVA-C02] [ASSOCIATE] EBS Volume Types - Provisioned IOPS (6:15)

[DVA-C02] [ASSOCIATE] EBS Volume Types - HDD-Based (4:32)

[ASSOCIATE] Instance Store Volumes - Architecture (9:00)

[ASSOCIATE] Choosing Between the EC2 Instance Store and EBS (8:49)

[ASSOCIATE] Snapshots, Restore & Fast Snapshot Restore (FSR) (10:55)

[ASSOCIATE] [DEMO] EBS Volumes - PART1 (15:16)

[ASSOCIATE] [DEMO] EBS Volumes - PART2 (14:13)

[ASSOCIATE] [DEMO] EBS Volumes - PART3 (14:27)

[ASSOCIATE] EBS Encryption (8:22)

[ASSOCIATE] Network Interfaces, Instance IPs and DNS (15:58)

[ASSOCIATE] [DEMO] Manual Install of Wordpress on EC2 - PART1 (12:27)

[ASSOCIATE] [DEMO] Manual Install of Wordpress on EC2 - PART2 (12:36)

[ASSOCIATE] Amazon Machine Images (AMI) (13:58)

[ASSOCIATE] [DEMO] Creating an Animals4life AMI - PART1 (9:38)

[ASSOCIATE] [DEMO] Creating an Animals4life AMI - PART2 (10:57)

[ASSOCIATE] [DEMO] Copying & Sharing an AMI (8:35)

EC2 Purchase Options - PART1 (9:22)

EC2 Purchase Options - PART2 (11:56)

Reserved Instances - the rest (11:58)

[ASSOCIATE] Instance Status Checks & Auto Recovery (7:42)

[ASSOCIATE] [DEMO] Shutdown, Terminate & Termination Protection (5:40)

[ASSOCIATE] Horizontal & Vertical Scaling (11:23)

[ASSOCIATE] Instance Metadata [THEORY & DEMO] (15:46)

Section Quiz - EC2 Basics

Monitoring and Logging

CloudWatch Architecture - PART1 (9:44)

Alt text CloudWatch: Concepts

Alt text CloudWatch: Architecture

Alt text CloudWatch: Namespace, Data-point, Metric, Dimension

CloudWatch Architecture - PART2 (9:19)

Alt text CloudWatch: Resolution, Retention, Statistic, Percentile

Alt text CloudWatch: Alarms

Alt text CloudWatch: Data Architecture

CloudWatch Logs Architecture (13:44)

Alt text CloudWatch Logs - Ingestion

Alt text CloudWatch Logs - Log Group/Stream/Event

Alt text CloudWatch Logs - Subscriptions

Alt text CloudWatch Logs - Aggregation

Alt text CloudWatch Logs - Overview

AWS X-Ray (6:20)

Alt text AWS X-Ray: Concepts

Alt text AWS X-Ray: Service Map

Alt text AWS X-Ray: How to use?

[DEMO] Lambda & AWS X-ray (16:28)

[ASSOCIATE] VPC Flow logs (9:56)

Alt text VPC FLow Logs - Capture traffic metadata, NOT capture contents, NOT realtime

Alt text VPC FLow Logs - Architecture

Alt text VPC FLow Logs - Flow Log Records

CONTAINERS, ECS & ECR

[ASSOCIATE] Introduction to Containers (17:13)

[ALL] [DEMO] Creating ‘container of cats’ Docker Image (18:15)

[ASSOCIATE] ECS - Concepts (10:25)

[ASSOCIATE] ECS - Cluster Mode (13:09)

[ALL] [DEMO] - Deploying ‘container of cats’ using Fargate [UI UPDATES IN PROGRESS] (13:13)

[DVA-C02] Elastic Container Registry (ECR) (4:14)

[ALL] Kubernetes 101 (11:27)

[ALL] Elastic Kubernetes Service (EKS) 101 (6:14)

Advanced EC2

[ASSOCIATE] Bootstrapping EC2 using User Data (10:25)

[ASSOCIATE] [DEMO] Bootstrapping Wordpress Installation - PART1 (15:00)

[ASSOCIATE] [DEMO] Bootstrapping Wordpress Installation - PART2 (6:45)

[ASSOCIATE] EC2 Instance Roles & Profile (4:18)

[ASSOCIATE] [DEMO] Using EC2 Instance Roles (13:31)

[ASSOCIATE] SSM Parameter Store (6:16)

[ASSOCIATE] [DEMO] Parameter Store (16:11)

[ASSOCIATE] System and Application Logging on EC2 (6:15)

[ASSOCIATE] [DEMO] Logging and Metrics with CloudWatch Agent-PART1 (11:51)

[ASSOCIATE] [DEMO] Logging and Metrics with CloudWatch Agent-PART2 (8:08)

[ASSOCIATE] EC2 Placement Groups (14:29)

[ASSOCIATE] Enhanced Networking & EBS Optimized (6:57)

Infrastructure as Code (CloudFormation)

CloudFormation Physical & Logical Resources (7:30)

[DEMO] Simple Non Portable Template - PART1 (10:28)

[DEMO] Simple Non Portable Template - PART2 (11:28)

CloudFormation Template and Pseudo Parameters (6:53)

CloudFormation Intrinsic Functions (14:28)

CloudFormation Mappings (4:30)

CloudFormation Outputs (3:37)

[DEMO] Template v2 - Portable (13:34)

CloudFormation Conditions (7:24)

CloudFormation DependsOn (7:14)

CloudFormation Wait Conditions & cfn-signal (11:52)

CloudFormation Nested Stacks (13:55)

CloudFormation Cross-Stack References (10:05)

CloudFormation Stack Sets (9:12)

CloudFormation Deletion Policy (5:24)

CloudFormation Stack Roles (6:47)

CloudFormation Init (CFN-INIT) (8:48)

CloudFormation cfn-hup (4:13)

[DEMO] wait conditions, cfn-signal, cfn-init and cfn-hup - PART1 (12:51)

[DEMO] wait conditions, cfn-signal, cfn-init and cfn-hup - PART2 (14:42)

CloudFormation ChangeSets (11:03)

CloudFormation Custom Resources (11:03)

[DEMO] CloudFormation Custom Resources-PART1 (9:12)

[DEMO] CloudFormation Custom Resources-PART2 (13:27)

Global Service Discovery and Content Delivery (R53 and CloudFront)

[ASSOCIATE] R53 Public Hosted Zones (6:28)

[ASSOCIATE] R53 Private Hosted Zones (5:10)

[ASSOCIATE] CNAME vs R53 Alias (5:19)

[ASSOCIATE] Simple Routing (2:17)

[ASSOCIATE] R53 Health Checks (12:41)

[ASSOCIATE] Failover Routing (1:53)

[ALL] [DEMO] Using R53 and Failover Routing-PART1 (16:41)

[ALL] [DEMO] Using R53 and Failover Routing-PART2 (6:28)

[ASSOCIATE] Multi Value Routing (2:32)

[ASSOCIATE] Weighted Routing (3:24)

[ASSOCIATE] Latency Routing (2:44)

[ASSOCIATE] Geo-location Routing (5:02)

[ASSOCIATE] Geo-proximity Routing (4:50)

[ASSOCIATE] R53 Interoperability (11:50)

[ALL] CloudFront - Architecture (14:56)

[ALL] CloudFront (CF) - Behaviors (9:21)

[ALL] CloudFront - TTL and Invalidations (13:48)

[ALL] CloudFront - SSL/TLS (14:59)

[ALL] CloudFront (CF) - Origin Types & Origin Architecture (10:20)

AWS Certificate Manager (ACM) (11:21)

[ALL] [DEMO] CloudFront (CF) - Adding a CDN to a static Website-PART1 (16:23)

[ALL] [DEMO] CloudFront (CF) - Adding a CDN to a static Website-PART2 (12:24)

[ALL] [DEMO] CloudFront (CF) - Adding an Alternate CNAME and SSL (11:12)

[ALL] CloudFront - Security - OAI & Custom Origins (8:50)

[ALL] [DEMO] CloudFront (CF) - Using Origin Access Control (OAC) (new version of OAI) (11:21)

[ALL] CloudFront - Security - Private Distributions (7:49)

[ALL] CloudFront - Geo-Restriction (9:40)

[ALL] CloudFront - Field Level Encryption (9:00)

[ALL] CloudFront - lambda@edge (8:03)

Section Quiz - R53 and CDN

DATABASES (SQL)

[ASSOCIATE] Database Refresher & MODELS - PART1 (8:51)

[ASSOCIATE] Database Refresher & MODELS - PART2 (14:45)

[ASSOCIATE] Databases on EC2 (13:08)

[ASSOCIATE] [DEMO] Splitting Wordpress Monolith => APP & DB (18:01)

[ASSOCIATE] Relational Database Service (RDS) Architecture (11:39)

[ASSOCIATE] [DEMO] Migrating EC2 DB into RDS - PART1 (18:20)

[ASSOCIATE] [DEMO] Migrating EC2 DB into RDS - PART2 (12:58)

[ASSOCIATE] Relational Database Service (RDS) MultiAZ - Instance and Cluster (11:54)

[ASSOCIATE] RDS Automatic Backup, RDS Snapshots and Restore (8:52)

[ASSOCIATE] RDS Read-Replicas (6:36)

[ASSOCIATE] [DEMO] MultiAZ & Snapshot Restore with RDS - PART1 (14:05)

[ASSOCIATE] [DEMO] MultiAZ & Snapshot Restore with RDS - PART2 (12:07)

[ASSOCIATE] RDS Data Security (7:03)

[DVA-C02] [ASSOCIATE] Aurora Architecture (13:44)

[ASSOCIATE] Aurora Serverless (9:52)

[DEMO] Migrating to Aurora Serverless [DON’T DO THIS DEMO, IT WON’T WORK, UPDATING to SERVERLESSv2] (14:47)

[ASSOCIATE] Secrets Manager (7:44)

Section Quiz - RDS

Advanced Storage

[DVA-C02] [ASSOCIATE] EFS Architecture (9:05)

[ASSOCIATE] [DEMO] Implementing EFS - PART1 (8:51)

[ASSOCIATE] [DEMO] Implementing EFS - PART2 (11:32)

[ASSOCIATE] [ DEMO] Using EFS with Wordpress (16:00)

FSx for Windows File Server (11:32)

FSx for Lustre (13:57)

AWS Storage Services

Storage TypeWhat is it?What is it Optimized for?Storage Services or Tools
BlockBlock storage is direct-attached to a compute instance with low-latency access.Low-latency, high-performance durable storage for single EC2 instances or containers, e.g., databases and local instance storageAmazon EBS, Amazon EC2 instance store
File SystemFile-based storage is natively mountable from virtually any operating system, and can be shared across multiple compute instances.Shared read and write access across multiple EC2 instances/containers or from multiple on-prem servers, e.g., team file shares, enterprise applications, analytics workloads, and ML trainingAmazon EFS
Amazon FSx, Amazon FSx for Lustre, Amazon FSx for NetApp ONTAP, Amazon FSx for OpenZFS, Amazon FSx for Windows File Server
AWS Storage Gateway
ObjectObject storage provides easy access to data through an API)over the internet and is well-suited to read-heavy workloadsRead-heavy workloads, global data storage, access, and distribution over the internet, e.g., content distribution, web hosting, big data analytics, and ML workflowsAmazon S3
CacheManaged, scalable, high-speed cache on AWS for processing file data stored in disparate locations, including on-premises NFS file systems, and/or in cloud file systems (Amazon FSx for OpenZFS, Amazon FSx for NetApp ONTAP), and Amazon S3Amazon File Cache, AWS Storage Gateway

Scaling, Load Balancing & High-Availability

[ASSOCIATE] Regional and Global AWS Architecture (10:42)

[ASSOCIATE] Evolution of the Elastic Load Balancer (4:10)

[ALL] Elastic Load Balancer Architecture - PART1 (10:18)

[ASSOCIATE] Elastic Load Balancer Architecture - PART2 (12:49)

[ALL] Application Load balancing (ALB) vs Network Load Balancing (NLB) (16:20)

[ASSOCIATE] Launch Configuration and Templates (4:00)

[ASSOCIATE] Auto-Scaling Groups (16:01)

[ASSOCIATE] ASG Lifecycle Hooks (4:41)

[ASSOCIATE] ASG HealthCheck Comparison - EC2 vs ELB (3:38)

[ADVANCED_DEMO] Architecture Evolution - STAGE1 - PART1 (14:24)

[ADVANCED_DEMO] Architecture Evolution - STAGE1 - PART2 (10:43)

[ADVANCED_DEMO] Architecture Evolution - STAGE2 (12:58)

[ADVANCED_DEMO] Architecture Evolution - STAGE3 (19:30)

[ADVANCED_DEMO] Architecture Evolution - STAGE4 (18:04)

[ADVANCED_DEMO] Architecture Evolution - STAGE 5 - PART1 (11:31)

[ADVANCED_DEMO] Architecture Evolution - STAGE 5 - PART2 (14:56)

[ADVANCED_DEMO] Architecture Evolution - STAGE6 (5:48)

AWS CLI, DEVELOPER TOOLS & CI/CD (CODE)

CI/CD using AWS Code (14:54)

Alt text Version Control System: Git

Alt text VCS & CI/CD

Alt text CI/CD with AWS

Alt text CD/CD Pileline

Alt text Code Deploy output

AWS CodeCommit (11:35)

AWS CodePipeline for Developers (4:08)

Alt text AWS CodePineline: The orchestator for CI/CD

Alt text AWS CodePineline: Concepts

Alt text AWS CodePineline: Architecture

AWS CodeBuild for Developers (6:23)

Alt text CodeBuild: Build & test code as-a-service (alternative to part of Jenkins)

Alt text CodeBuild: Architecture

Alt text CodeBuild: Architecture

Alt text CodeBuild: buildpsec.yml

AWS CodeDeploy for Developers (10:21)

Alt text CodeDeploy: Deploy code as-a-service (alternative to Jenkins, Ansible, Chef, Puppet, Cfn)

Alt text CodeDeploy: appspec.yml

Alt text

Elastic Container Registry (ECR) - Architecture (4:14)

[DVA-C02] [ADVANCED_DEMO] - CatPipeline - STAGE0 - INTRO (2:23)

[DVA-C02] [ADVANCED_DEMO] - CatPipeline - STAGE1 - CodeCommit (12:31)

[DVA-C02] [ADVANCED_DEMO] - CatPipeline - STAGE2 - Build a Docker Image w/ CodeBuild - PART1 (13:40)

[DVA-C02] [ADVANCED_DEMO] - CatPipeline - STAGE2 - Build a Docker Image w/ CodeBuild - PART2 (15:02)

[DVA-C02] [ADVANCED_DEMO] - CatPipeline - STAGE3 - Joining the dots - pipeline (15:31)

[DVA-C02] [ADVANCED_DEMO] - CatPipeline - STAGE4 - Deploy our Container w/ CodeDeploy - PART1 (11:29)

[DVA-C02] [ADVANCED_DEMO] - CatPipeline - STAGE4 - Deploy our Container w/ CodeDeploy - PART2 (7:42)

[DVA-C02] [ADVANCED_DEMO] - CatPipeline - STAGE5 - CLEANUP (4:07)

Application Services, Event-Driven & Serverless

[ASSOCIATE] Architecture Deep Dive - PART1 (8:52)

[ASSOCIATE] Architecture Deep Dive - PART2 (13:09)

[ALL] AWS Lambda - PART1 (11:25)

[ALL] AWS Lambda - PART2 (13:59)

[ALL] AWS Lambda - PART3 (17:03)

[ASSOCIATE] EventBridge (6:54)

[ASSOCIATE] [DEMO] Automated EC2 Control using Lambda and Events - PART1 (13:44)

[ASSOCIATE] [DEMO] Automated EC2 Control using Lambda and Events - PART2 (18:49)

[ASSOCIATE] Simple Notification Service (7:49)

[ASSOCIATE] Simple Queue Service (15:30)

SQS Standard vs FIFO Queues (3:29)

SQS Extended Client Library (2:52)

SQS Delay Queues (4:38)

SQS Dead-Letter Queues (4:17)

[ASSOCIATE] Step Functions (16:09)

[ALL] API Gateway 101 (16:27)

[MINI_PROJECT] Build A Serverless App - Pet-Cuddle-o-Tron - PART1 [UI UPDATES IN PROGRESS] (5:01)

[MINI_PROJECT] Build A Serverless App - Pet-Cuddle-o-Tron - PART2 [UI UPDATES IN PROGRESS] (8:24)

[MINI_PROJECT] Build A Serverless App - Pet-Cuddle-o-Tron - PART3 [UI UPDATES IN PROGRESS] (12:31)

[MINI_PROJECT] Build A Serverless App - Pet-Cuddle-o-Tron - PART4 [UI UPDATES IN PROGRESS] (13:31)

[MINI_PROJECT] Build A Serverless App - Pet-Cuddle-o-Tron - PART5 [UI UPDATES IN PROGRESS] (12:55)

[MINI_PROJECT] Build A Serverless App - Pet-Cuddle-o-Tron - PART6 [UI UPDATES IN PROGRESS] (2:39)

[ASSOCIATE] Kinesis Data Streams (7:52)

[ASSOCIATE] Kinesis Data Firehose (9:11)

[ASSOCIATE] Kinesis Data Analytics (8:51)

[ASSOCIATE] Amazon Cognito - User and Identity Pools (14:44)

[MINI_PROJECT] Implementing Web Identity Federation (WEB-IDF) - PART1 (7:28)

[MINI_PROJECT] Implementing Web Identity Federation (WEB-IDF) - PART2 (7:16)

[MINI_PROJECT] Implementing Web Identity Federation (WEB-IDF) - PART3 (8:16)

[MINI_PROJECT] Implementing Web Identity Federation (WEB-IDF) - PART4 (12:10)

[MINI_PROJECT] Implementing Web Identity Federation (WEB-IDF) - PART5 (2:31)

AWS Lambda In-Depth

Lambda Handler Architecture & Overview - PART1 - Theory (7:52)

Alt text Lambda Function Execution Environment

Alt text Lambda Function Handler

Lambda Handler Architecture & Overview - PART2 - Walkthrough (10:07)

Lambda Versions (4:58)

Alt text Lambda Versions: Unqualified ARN ($LATEST) & Qualified ARN (1, 2, 3…)

Alt text Lambda Versions: Example

Lambda Aliases (4:11)

Alt text Lambda Alias: ~ Git Tag

Alt text Lambda Alias: Example

[DEMO] Lambda - Aliases and Versions (13:10)

Lambda Environment Variables (7:20)

Alt text

Monitoring & Logging & Tracing Lambda Based Applications (13:24)

Alt text Lambda Monitoring

Alt text Lambda Logging

Alt text Lambda Tracing

[DEMO] Accessing Private VPC Resources using Lambda w/ TheCatAPI!!!! - PART1 (7:53)

Alt text

[DEMO] Accessing Private VPC Resources using Lambda w/ TheCatAPI!!!! - PART2 (16:19)

Lambda Layers (8:29)

Alt text

Lambda Container Images (4:14)

Alt text

Alt text

Lambda & ALB Integration (5:21)

Alt text

Alt text

Alt text

Lambda Resource Policy (9:52)

Alt text

Alt text

Alt text

Alt text

Section Quiz - Lambda

APIs & API Gateway In-Depth

API Gateway - Methods and Resources (4:28)

Alt text

API Gateway - [DEMO] Methods and Resources (17:04)

API Gateway - Integrations (14:02)

Alt text

Alt text

Alt text

Alt text

API Gateway Stages and Deployments (6:25)

Alt text

Alt text

Alt text

Open API & Swagger (7:56)

Alt text

Alt text

[DVA-C02] [DVA_DEMO] API Gateway Integrations - Mock, Lambda, AWS Service (23:55)

Section Quiz - API Gateway

NoSQL Databases & DynamoDB

DynamoDB Architecture Basics (10:49)

DynamoDB Operations, Consistency and Performance - PART1 (13:06)

DynamoDB Operations, Consistency and Performance - PART2 (11:24)

DynamoDB Indexes (LSI and GSI) (12:35)

DynamoDB Streams and Triggers (9:10)

[DVA-C02] [DEMO] DynamoDB Triggers using Lambda (16:54)

DynamoDB Accelerator (DAX) (10:58)

DynamoDB Global Tables (5:09)

DynamoDB Time-To-Live (TTL) (4:49)

ElastiCache Theory & Architecture (12:51)

[DVA-C02] Athena 101 (8:19)

[DVA-C02] [DEMO] Athena and large Datasets - PART1 (13:31)

[DVA-C02] [DEMO] Athena and large Datasets - PART2 (11:37)

Section Quiz - NoSQL

Elastic Beanstalk In-Depth

Elastic Beanstalk (EB) - Architecture (18:12)

Alt text Elastic Beanstalk (EB): Overview

what is elastic beanstalk (el)?

Elastic Beanstalk is a Platform as a service (PaaS)

  • Developers provides code

  • EB handles the deployment

    • capacity provisioning
    • load balancing
    • automatic scaling to web application health monitoring,
    • with ongoing fully managed patch and security updates
    • and many other things
      • networking (VPC, subnets)
      • EC2 instance: EBS, CloudWatch, Security Group
      • database
      • deployment strategy…

Alt text Elastic Beanstalk (EB): Platforms

note

EB provides:

  • Managed Platform for many languages:
    • Go, Java,
    • .NET, .NET Code,
    • Node, PHP, Python, Ruby
  • Custom Platform via Docker

Alt text Elastic Beanstalk (EB): Architecture

how to use eb?

When working with EB, you:

  1. Create an EB application
  2. Bundle a deployable code (aka source bundle) as an application version that will be automatically deployed either as One of two type of Environment tier:
    • Web Server environment
    • a Worker environment, that can be deployed with a message queue (SQS)
  3. Manage the environments
  4. Update new application version, and EB will deploy new versions of environments

Alt text Elastic Beanstalk (EB): Blue-Green Deployment

Alt text Elastic Beanstalk (EB): Summary

[DEMO] Elastic Beanstalk (EB) - Application & Environment - PART1 (11:50)

[DEMO] Elastic Beanstalk (EB) - Add additional environment and config options - PART2 (10:53)

Elastic Beanstalk (EB) - Deployment Policies (11:40)

Alt text EB - Deployment Policies

Alt text EB - Deployment Policies: All at once

Alt text EB - Deployment Policies: Rolling

Alt text EB - Deployment Policies: Rolling with additional batch

Alt text EB - Deployment Policies: Immutable

Alt text EB - Deployment Policies: Traffic Splitting

Alt text EB & Blue-Green Deployment

[DEMO] Elastic Beanstalk (EB) - Deployment (8:30)

Elastic Beanstalk (EB) - Environments and RDS (4:34)

Alt text

Alt text

Alt text

Elastic Beanstalk (EB) - Advanced Customization via .ebextensions (4:52)

Alt text

elastic beanstalk is based on cloudformation>

Use can provide additional Cfn configuration via the .config files inside .ebextensions folder in the source bundle.

These config can:

  • modify the EB application environment
  • modify the EC2 instances
  • deploy custom Cfn resources, make advance modification to Cfn resources

See GitHub - awsdocs/elastic-beanstalk-samples

Elastic Beanstalk (EB) - HTTPS (1:51)

Alt text

Elastic Beanstalk (EB) - Cloning (4:44)

Alt text

Elastic Beanstalk (EB) - Docker (9:11)

Alt text

Alt text

Alt text

[DEMO] Elastic Beanstalk (EB) - Section Cleanup (1:40)

Section Quiz - Elastic Beanstalk

Exams

AWS DVA-C02 - EXAM TRACKING

NoExamScoreScore PercentFinalExam TimeTest Date
1Cantrill - Practical Quiz 140/6462%1hDec 4, 2023 (15:00 - 16:00)
2Tutorials Dojo - Time Mode Set 1 245/6569%1h10mDec 5, 2023 (10:45 - 11:55)
3Tutorials Dojo - Time Mode Set 250/6576.9%Passed45mDec 6, 2023 (9:45 - 10:30)
4Tutorials Dojo - Time Mode Set 356/6586.2%Passed40mDec 7, 2023 (18:10 - 18:50)
5Tutorials Dojo - Time Mode Set 460/6592.3%Passed50mDec 8, 2023 (10:00 - 10:50)
6Tutorials Dojo - Time Mode Set 547/6572%Passed1hDec 9, 2023 (14:30 - 15h30)
2Tutorials Dojo - Time Mode Set 1 - 2nd attempt63/6596.92%Passed1hDec 10, 2023 (16:20 - 17:20)
7Tutorials Dojo - Final Test63/6596.92%Passed35mDec 10, 2023 (19:30 - 20:05)
8REAL AWS EXAM59/65 (Maybe)911/100Passed2hDec 13, 2023 (9:00 - 11:00)

Cantrill - Practical Quiz

NoQARef
1ELB - User login randomlyELB Sticky Session + Store session in DynamoDB
2Config SQS Short/Long PollingQueue’s ReceiveMessageWaitTimeSeconds attribute
ReceiveMessage call’s WaitTimeSeconds param
3DynamoDB TTL1 process using TTL attribute and mark expired
another process delete these expired items
DynamoDB StreamsDynamoDB Stream is a 24h flow of item changes
4Lambda function reuse execution environment between invocationsCache static assets locally in the /tmp directoryLambda Best Practice
Initialize SDK clients and database connections outside of the function handler
5Best practice to apply permissions to an EC2 instanceEC2 Instance Profile
6Serve private content with CloudFront & S3- Require users access private content by using CloudFront signed URL, signed cookies:Serve Private Content
👈️ This is implicit enabled after a signer is added
- Require users access your content by using CloudFront URLs, not directly from origin:
👈️ This is done with OAC (for S3 origin), or custom header (for custom origin)
7Protect API Gateway & LambdaBoth run outside VPC, needs to use WAF
8S3 - Encryption in transitIt’s default
9Process orders in 48 hours (in the origin order) & Cost effective48 hours -> Not Lambda -> Step Function + Lambda
In order -> SQS FIFO
10Using CWAgent to write logs to CloudWatch Logs from an EC2 instance in private subnet- CloudWatch Logs is an public service, which can be access other AWS services, or on-premise servers.
- To send logs to CloudWatch Logs without sending them through the internet,
1. A private connection needs to be established between your VPC and CloudWatch LogsUsing CloudWatch Logs with interface VPC endpoints
2. The EC2 instance have enough permissions to send logs to CW Logs
2a. EC2 instance profile (role) have permissionsGrant permissions that the CloudWatch agent needs to write metrics to CloudWatch
2b. Endpoint allows access (by default, endpoint policy allow all access to it)Default endpoint policy
11API - Gateway - Use the same function for multiple stages?Use stage variable to change the endpoint for each stageAPI Gateway - Stage variable
12How to give custom permissions to millions of users?Use Cognito Federated Users + IAM policy variableIAM Policy for federated users
13RDS Replica endpointsEach RDS Replica has its own endpoint. Except Aurora, RDS doesn’t provide a reader endpoint with load balancing
14Add sign up, sign in featuresCognito User Pool
15DynamoDB RCU/WRU calculation1 RCU = 4KB/s, 1 WRU = 1KB/s
16Where to store CW Agent config?SSM Parameter Store
17Elastic Beanstalk deploy to brand new infrastructure- EB immutable deploymentElastic Beanstalk & Blue-Green deployment
- Manually deploy to a new environment, EB supports swap DNS to the new environment
18API Gateway - Legacy APIs required transformationUse integration HTTP
19Delete all items in a DynamoDB table everyday???? Use DynamoDB TTL
20Route traffic from ELB to Lambda functionsYou can register your Lambda functions as targets of ELB listener
21SQS message size limit256KB. To work with larger files, offload it to S3
22CloudFormation: Share stack vs share templateShare stacks with Stack Reference; Share template with Nested Stack
23Where is CORS applied?CORS is applied to the origin being accessed, not the origin accessing.
24Which services use CloudFormation under the hood?SAM, Elastic Beanstalk
25What is the size limit for data sent to AWS KMS?4KB. To encrypt larger file, use DEK and envelope encryption
26S3 encryption by S3 server, manage key by applicationSSE-C
27???
28Tracing between many AWS servicesX-ray
29Host website on S3- Turn on Static Website Hosting
- Allow public access with bucket policy
30Decouple apps & Serverless scalingUse SQS + Lambda (config function concurrency)
31Give access to CodeCommit repoCodeCommit control access via IAM users: Create HTTPs credential in IAM; or create SSH key & associate to IAM user
32Whenever a new comment added, send an email?DynamoDB Stream + Lambda trigger + SNS
33SQS: Messages process twice?VisibilityTimeout not long enough
34Import APIs to API GatewayImport OpenAPI definitions
35Upload file to S3 - Improve performance?Transfer Acceleration
36Kinesis: Improve performance?Increase number of shards (shard splitting)
37Lambda: Share libraryLambda Layer
38Collect real time dataKinesis Data Streams
39Reuse Lambda function for multi stagesUse stage variable
40Embed Lambda function in CloudFormation templateCode’s ZipFile
41Host static websiteS3 + CloudFront
42Config/Update EC2 instance with CloudFormationcfn-init + cfn-signal & cfn-hup
43Query only a part of data on S3S3 Select
44Attach an EBS volume to EC2 instanceCreate file system; Mount it
45DynamoDB: Primary keyStudent ID
46APIs to request temporary credentials with IAMAssumeRole, AssumeRoleWithSAML, AssumeRoleWithWebIdentity
47API Gateway: Ensure searchString parameter is in the requestMethod Request
48Increase CPU allocation of a Lambda functionIncrease memory allocation
49CloudWatch namespace & metrics
50Run AWS CLI in EC2, what will happened?It won’t run. AWS CLI use other credential first ???
51DynamoDB WCUWrite operation is not strongly/eventually consistent. Only read has consistent problem.
52Send a message to userSNS
53S3 ListAPImax-items, page-size
54DynamoDB: Improve read performanceDAX
55Migrate microservice to AWS, low operation overheadECS Fargate
56DynamoDB eventually readUse less RCU than strong consistent read, may receive outdated data
57Which S3 encryption option can be used with CloudHSM?CSE
58CloudFront stale objectInvalidate
59Failover to an maintenance page on S3Route 53 + Health-check
60S3: Block all access except from CloudFrontOAC, OAI (legacy)
61Improve performance of app (using DynamoDB) without modify codeIncrease RCU
62Application workflow take up to 45 min + Cost effectiveStep Function + Lambda
63ASG: Instances started & terminated rapidlyIncrease cooldown time
64SQS + 5 EC2 instancesIncrease polling time; Use ASG for scaling based on queue length
65Check if a Spot instance is terminatedUse instance metadata service

Tutorial Dojo - DVA-C02 - Timed Mode Set 1 - 2nd attempt

Test time: xx

Score: 63/65 (96.92%):

  • CDA – Development with AWS Services 100% (27/27)
  • CDA – Security 88.89% (8/9)
  • CDA – Deployment 100% (7/7)
  • CDA – Troubleshooting and Optimization 95.45% (21/22s)

Domain 1: Development with AWS Services

NoQARef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

Domain 2: Security

NoQARef
1
2
3
4
5
6
7
8S3. SSE-KMS. Which header?x-amz-server-side-encryption. If the header were not present, S3 use the default KMS key
9

Domain 3: Deployment

NoQARef
1
2
3
4
5
6
7

Domain 4: Troubleshooting and Optimization

NoQARef
1
2
3
4
5
6
7
8
9
10
11
12
13
14DynamoDB: Scan. Improve performance, cost-effectiveUse Query, or still use Scan but with smaller page-size
15
16
17
18
19
20
21
22

Tutorial Dojo - DVA-C02 - Timed Mode Set 1

Domain 1: Development with AWS Services

NoQARef
1Improve performance of S3 uploadMultipart upload
2Caching: Lazy-load & Write-through
3Lambda: Different parameter depends on environmentEnvironment variable (# Stage variable)
4AWS SAM: shift traffic to new versionSAM Deployment strategySAM - Deploying gradually
- AllAtOnce (1 deploy)
- Canary 10% 5, 10, 15, 30 min (2 deploys)
- Linear 10% Every 1, 2, 3, 10 min
5API Gateway: same API Gateway for multiple environmentsStage variable
6CloudWatch Alarm: When to alarm?Period / Evaluation Periods / Data points to Alarm
7SAM: Nested applicationAWS::Serverless::Application
8Lambda deploy: Graduate increase traffic to new versionLambda supports traffic shifting for aliases (by setting traffic weight). (That’s why SAM have canary, linear deployment strategy )
9API Gateway: Map data for microservice (in container)Use HTTP integration (Not AWS or _PROXY)
10Database scale globally, handle frequent schema changesDynamoDB (not Aurora)
11API Gateway - TTL 300s. How client can invalidate cache?Send request with Cache-Control: max-age=0 header
12Lambda: Response to user after 5 minLambda Invoke API InvocationTypeInvoke - InvocationType
- RequestResponse: Synchronous invocation
- Event: Asynchronous invocation
- DryRun: Validate params/role
13Session data store on DynamoDB. Delete session of logged out users?Use DynamoDB TTL (when will an item is eligible for expiration - in epoch time)
14S3: Remove PII before return to applicationUse S3 Object Lambda to process object before return to applicationS3 Object Lambda S3 Object Lambda Use with CloudFront
15Serve content based on location- CloudFront can add header about viewer location’s location (based on the viewer’s IP address).
- Use a CloudFront function to return the URL base on these headers (e.g. CloudFront-Viewer-Country)
16What to do after update Cfn template of a Lambda function?1. aws cloudformation package: Uploads local artifacts to S3, update Cfn template to reference these artifacts
2. aws cloudformation deploy: Update (deploy) the Cfn stack
17Multi-thread key-value cache storeElasticache for Memcached
18Only allow authorized clients to invalidate an API Gateway cache- API Gateway Additional settings / Per-key cache invalidation / Require authorizationInvalidate an API Gateway cache entry
- Client send request with Cache-Control: max-age=0 header.
19Process long-running tasksElastic Beanstalk worker environment (an HTTP request handler that EB invokes with an SQS queue)
20ECS: Where to config port for container?Task definition
21Lambda: 50 requests/s; 100 s/request 👉️ 5.000 concurrency executionDefault quota of Lambda concurrency execution: 1.000 (can be increased to 10.000)
22Can Lambda handle 10 requests/s (each request take 50s)500 concurrent execution (Lambda can handles without doing anything. The default limit is 1.000)
23DynamoDB table attributes: UserID (PK) - GameTitle (SK) - TopScore. Get max TopScore of each game?Create a Global Secondary Index: GameTitle (PK) - TopScore (SK). Query 1 item for each game in descending order.
24Kinesis Data Streams: How many worker is optimal to process a number of shards?1:1 ratio
25AWS CLI timeout when list bucket with 10.000 objectsAdd pagination parameter when use AWS CLI
26Permission to Create/Delete GitCommit reposcodecommit:CreateRepository & codecommit:DeleteRepository
27DynamoDB Streams: Send a copy of old item to S3StreamViewType: OLD_IMAGE

Domain 2: Security

NoQARef
1Give a program to AWS services- Best practice: EC2 instance profile (IAM Role)
- On premise: Long-term credential
2Share DB endpointUse System Manager Parameter Store secure string
3Database credential - How to encrypt & auto rotate?- AWS Secret Manager + Enable auto rotate
- IAM DB Authentication: Authenticate connection with IAM
4API Gateway: Allow another account invoke via IAM Role1. From the other account, grant permission to interact with this API GatewayManaging access to API Gateway
2. From this account, attach a resource-policy to API Gateway that grant the IAM role from other account permission to invokeAllow roles in another AWS account to use an API
5Grant permission to access only some path of a S3 bucketUse S3 bucket policy, with the policy statement Resource including the path
6Login with social site: Facebook…, then access to AWS serviceCognito Identity Pool (Federated Identity)
7S3 - Encrypt AE256x-amz-server-side-encryption: AE256
8S3 - Ensure all objects are encryption at rest with SSE-KMSAdd a bucket policy which denies any s3:PutObject action unless the request includes the x-amz-server-side-encryption header.
9KMS - Generate data key but not use immediatelyGenerateDataKeyWithoutPlaintext

Domain 3: Deployment

NoQARef
1Implement subscription with API GatewayUse usage plan to distribute APIs & throttle usages based on defined limit/quotaAPI Gateway - Usage plan
2Lambda, pause task & wait for external processStep Function - Callback pattern (SQS + SNS + Lambda)Step Function - Callback Pattern
- waitForTaskToken
- SendTaskSuccess (with the task token)
3Deploy Lambda with CodeDeployCodeDeploy deploy configuration:
- EC2, on-premise: AllAtOnce, HalfAtATime, OneAtATime (Can be Blue/Green or in-place)
- Lambda, ECS: AllAtOnce, Canary, Linear
4Build, test, deploy serverless appServerless Application Model (SAM)
5SAM template requires sectionsTransform & Resources
6Create Lambda function with CLI error InvalidParameterValueExceptionInvalid parameter: maybe a role can’t be assumed
7ECS schedule task based on CPU/memoryECS - Task placement strategy: binpack, spread, random

Domain 4: Troubleshooting and Optimization

NoQARef
1Move session data to AWS, 100% CPU, HAElastiCache for Redis
2sam local - Access denied1. aws configure --profile; 2. sam local invoke --profile
3Cost effective when using SQSLong polling (config ReceiveMessage WaitTime)
4Record all changes to a DynamoDB table to another oneDynamoDB Streams + Lambda (write to another DynamoDB table)
5DynamoDB - Reduce queriesDAX
6Serve private content from CloudFront1. Use signed-URL, sign-cookies
2. Use Lambda@Edge + Cognito 👉️ Authentication@Edge
7X-ray: How to debug?_X_AMZN_TRACE_ID + AWS_XRAY_CONTEXT_MISSING
8ECS store data in DynamoDB, how to verify each new items?DynamoDB Streams + Lambda
9API Gateway - 504504 Gateway timeout -> Integration timeout after 30s
10RDS - Too many connectionsRDS Proxy
11API Gateway timeout - Which CW metrics to watch?Latency, IntegrationLatency
12CloudFront HTTPSViewer Protocol Policy: Only HTTPS or Redirect HTTP to HTTPS
13CloudFront - end-to-end SSLViewer Protocol Policy, Origin Protocol Policy: HTTPS
14DynamoDB Scan improve performance- Default page size: 1MB (Max) -> Reduce page size
- Use Query instead of Scan
15Capture IP in/out of an VPCVPC Flow Log
16Elastic Beanstalk config for cron-jobcron.yaml
17DynamoDB - Fetch only some attributesUse projection attributes
18Lambda function download same big fileUse /tmp
19Use Lambda function inside a VPC- By default, Lambda is public (has internet access)
- After enable VPC for a Lambda function, it lose internet access,
- If you require internet access for Lambda function:
1. Add a NATGW to VPC
2. Allow outbound traffic with security group
20X-Ray filter trace1. Add annotation to record data used to group traces (indexed to used with filter expression)
(metadata is extra data about data that isn’t indexed )
2. Use filter expression to group traces in the console
21App deploy with Elastic Beanstalk - Config X-Ray.ebextensions/xray-daemon.config
22API Gateway: Lambda Proxy - 502 Bad GatewayIn Lambda proxy integration, the backend Lambda function must return output according a JSON formatOutput format of a Lambda function for proxy integration

Tutorial Dojo - DVA-C02 - Timed Mode Set 2

Test time: 9h45 - 10h28 (00:47:24)

Score: 50/65 (76.92%):

  • CDA – Development with AWS Services 79.49%
  • CDA – Security 77.78%
  • CDA – Deployment 87.5%
  • CDA – Troubleshooting and Optimization 55.56%

Domain 1: Development with AWS Services

NoQARef
1RDS + Lambda + Translate text with Amazone Translate. Improve performance, reduce load to RDS?Use Lambda execution environemnt /tmp as cache store
2DynamoDB: Employee info. Which attribute use as primary key?employee_id
3Run a Lambda function every 30min?Use EventBridge Schedule Rule to create scheduled events -> target the Lambda function
4ECS intergate with API Gateway. Which integration make no intervention?HTTP_PROXY
5Which API to call to get permission (from a IAM Role) to interact with S3 APIAWS STS AssumeRole API (or AssumeRoleWithWebIdentity, AssumeRoleWithSAML) (optionally pass an SessionPolicy)
6Asynchronous invoke Lambda function with Invoke APIPass parameter InvocationType - Event
7Tracking number of visitors on website (use DynamoDB)1. (May over/under count) “Atomic counter” - just increase the counter without checking current value
2. Use condition write to only update the counter item if (…) - too complicated to knowConditional Writes - DynamoDB Conditional Updates - DynamoDB
8Kinesis Data Streams: Duplicate Records- Two primary reasons: 1. Producer retries; 2. Consumer retries.Handling Duplicate Records - Kinesis
- Manually assign sequence number to record with Kinesis PutRecord SequenceNumberForOrdering.Adding a Single Record - Kinesis
(Same idea as assign an ID to message SQS SendMessage MessageDeduplicationId )
9X-Ray: Include info about calls to AWS servicesInclude sub-segment in the segment document
10DynamoDB: Forum (PK) - Subject (SK) - LastPostUpdateTime. Finds on posts of a forum in last 3 monthsAdd LSI: Forum (PK) - LastPostUpdatTime (SK). Use Query opeartion.
11DynamoDB: Write heavy - ProvisionedThroughputExceededException. Why?RCU/WCU of GSI is seperate from base table
- A Query on a GSI consume RCU from the GSI, not the base table.Data synchronization between tables & GSIs
- When you Put/Update/Delete items in a DynamoDB table, any GSIs on that table are also updated asynchronously (and consume RCU/WCU from the GSI).Provisioned throughput considerations for GSIs
12CodeCommit: Permission to fetch, clone, pushcodecommit:GitPull, codecommit:GitPush
13Elastic Beanstalk: Deploy new version with CLIPackage app as zip/war file. Deploy with eb deploy (EB CLI is a different package. It’s not packaged with AWS CLI, not aws eb)
14Internal app: elastic, cost-effectiveDynamoDB, EC2 Spot Fleet
15Build an CI/CD to deploy to both EC2 & on-premise. Which service?CodeDeploy
16DynamoDB: 10 RCU, each item 4KB. How much read request/s the table can hanlde?10 RCU: 10 Strong Consistency Read - 20 Eventually Consistency Read
17Prototype microservices on ECS. Which task placement minimize cost?Binpack, random, spread
18Temporary AWS credential for both authenticated/unauthenticated. Which service?Cognito Identity Pool (Federated Identity)
19Elastic Beanstalk: Deploy infrastructure has an RDS instance coupling with EB. How to migrate RDS?1. Create RDS snapshot; enable RDS deletion protection
2. Remove SG attached to RDS (before delete EB app’s environment)
3. Terminate the EB app’s environment
20SQS: Duplicated messages. How to fix?For SQS, when call SendMessage API, add MessageDeduplicationId param
(For Kinesis, when call PutRecord API, add SegmentID to SequenceNumberForOrdering param)
21DynamoDB: Protect from overwritten?Implement optimistic locking with version number (ensure update the right version item)Optimistic locking with version number - DynamoDB
22Lambda: Asynchronous invoke, exponential back-off, then send un-processed messages to another service.Lambda supports Dead Letter Queue (just as SQS DLQ)
23Collect visistor click to ads. Which service?DynamoDB: Use UpdateItem to implement atomic counter (Approximately ~ Add 1 to previous value)
24DynamoDB: Read 100 items. Which API?BatchGetItem (instead of GetItem) then BatchWriteItem
25DynamoDB: Store recent updated item automatically1. DynamoDB Streams + Lambda (not recommnend)
2. DynamoDB Streams + DynamoDB Streams Kinesis Adapter (recommend)
26DynamoDB: Session data. Reduce storage without using provision throughputUse DynamoDB TTL
27Kinesis Data Streams: How to handle data flow (Scaling)?1. Split shards to increase stream capacity; 2. Merge shards to decrease stream capacity.
28Kinesis Data Streams: Consumer process every other day & store to S3. S3 only has half of the data?Kinesis Data Streams default retention period is 24h (up to 365 days)
29An AWS account has 2 Lambda function. 1 works optimal, 1 is throttled. Why?The reserve concurrency execution of function 1 is higher
30Lambda: Process events from S3 Events. 10 events/s, each event takes 3s. How much concurrency?Concurrency: number of in-flight request AWS Lambda function is handling at the same time.
Concurrency = (Number of request/s) x (Time to process a request)
31Lambda: Concurrency quotas- Account-level: 1.000 unit of concurrencyLambda Concurrency Quotas
- Function-level: Up-to 900 unit of concurrency. AWS reservers 100 for functions without reserved concurrency
32Protect AWS APIs call with MFAMFA-enabled IAM users must call GetSessionToken and submit an MFA code that is associated with their MFA device.
33Elastic Beanstalk: Environment manifest (environment name, solution stack…)- Environment manifest: /env.yamlEnvironment manifest (env.yaml) - Elastic Beanstalk
- Advance config: /.ebextensions/***.config (YAML or JSON)Advanced environment customization with configuration files (.ebextensions)
34Website hosted on S3 bucket_A, make GET request to S3 bucket_B. API calls are blocked by browers?Enable CORS on bucket_B
35Migrate repos from Github to CodeCommit1. Create repos on CodeCommit; 2. Clone repos from Github; 3. Push to CodeCommit repos
36Lambda: Increase CPU?By increase memory
37ECS: Integrate with X-Ray. How to provide more granular timing information?Use sub-segment
38Version control system. Which service?CodeCommit
39API Gateway: Non-proxy integration with Lambda. How to ensure consumer include a query tring?Use method request

Domain 2: Security

NoQARef
1Cognito - Enforce MFA for suspicious login attemptUser Pool / Adaptive Authentication / Automatic risk responseAdaptive Authentication - User Pool
2EC2 instance - Upload images to S3. How to give EC2 instance permission?IAM Role (Instance Profile)
3Dev needs to access Test/Prod accounts. How to give permission?Grant cross-account access:
- In Test/Prod accounts, create IAM Role (with permissons)
- In Dev account, grant access to assume that IAM Role
4API Gateway - Lambda Authorizer: Implement one that same as OAuth, SAMLAPI Gateway - Lambda Authorizer (Custom Authorizer) has 2 types:
- Token-based Lambda Authorizer <= Bearer token: OAuth token, JWT
- Request parameter-based Lambda Authorizer <= aka REQUEST authorizer (supports a lot of data: headers, query string, stageVariales, $context…)
5EC2 instance has both credentials & Instance ProfileAWS CLI credentials precedence: CLI options > ENVVAR > Assumed Role > IAM Idendity (/.aws/config) > Credential file (/.aws/credentials) > EC2 instance profile > Container credentalAWS CLI Credentials Precedence
6Provide application in ECS access to the required AWS resourcesFargate: IAM Role -> attach to task
EC2: Container Instance Role
7KMS: Envelope Encryption1. encrypt plaintext data with a data key
2. encrypt the data key with a top-level plaintext master key
8S3 - Encryption using KMS-C. How to upload object?Include the headers: x-amz-server-side​-encryption​-customer- + algorithm/key/key-MD5
9IAM, SCP - How to test IAM policy?IAM Policy Simulator

Domain 3: Deployment

NoQARef
1SAM: workflow redeploy1. sam build; 2. sam deploy
2Elastic Beanstalk: Dev/Test - Reploy ASAPEB deployment strategy: AllAtOnce
3SAM: deploy 10% every 10minSAM Linear 10min
4Lambda: package deployment take too much time to deploy? How increase deploy speed?Lambda package deployment quota (for a function) is 50 MB (zipped; includes runtimes, layer…)
- Extract shared dependencies to layer.
- (Or upload to S3)
5CodeDeploy AppSpec - Run a task before traffic is shifted to a Lambda functionAppSpec hook
- Lambda: (Before) - AllowTraffic - (After)
6CloudFormation: Easiest way to deploy a hello_world lambda functionIncline the function in AWS::Lambda::Function Properties / Code / Zipfile
7Elastic Beanstalk: Upgrade from Java 7 to 8. Shift all traffic to the new one, revert if something’s wrongBlue/Green Deployment: EB AllAtOnce + EB swap environent URLs (EB will use Route 53 to swap CNAMEs)Blue/Green deployments with Elastic Beanstalk
8CodeDeploy: Deploy to where? How?CodeDeploy deploy configuration:
- EC2, on-premise: AllAtOnce, HalfAtATime, OneAtATime (Can be Blue/Green or in-place)
- Lambda, ECS: AllAtOnce, Canary, Linear

Domain 4: Troubleshooting and Optimization

NoQARef
1DynamoDB: ProvisionedThroughputExceededOptimize DynamoDB:
1. Use Query instead of Scan
2. Use Eventually Consistent Read instead of Strongly Consistent Read
3. Use DAX
2X-Ray: View full trace without using consoleUse GetTraceSummaries, BatchGetTraces
3ECS + Docker app: How to setup tracing with X-Ray?- Run xray-daemon inside docker imageAWS X-Ray daemon
- Config port mapping (UDP:2000) in ECS task definition
4AWS CLI - TimeoutUse pagination: --page-size (request less items) --max-items (show less items)AWS CLI pagination options
5Kinesis Data Streams: Not enough shards & Instances CPU 100%1. Increase number of shards (shard splitting). 2. Increase instance size
6RDS can’t handle read1. Use RDS Multi-AZ Cluster (not Multi-AZ Instance)
2. Create Read Replica, then update app to read from replica
7X-Ray - namespace, metadataX-Ray namespace: distinguish AWS/remote
8CloudWatch - namespaceCloudWatch namespace: container for metrics, e.g. aws/lambda
9X-Ray: From where, IP address is fetch?X-Forwarded-For header

Tutorial Dojo - DVA-C02 - Timed Mode Set 3

Test time: Dec 7 2023, 9h45 - 10h28 (00:47:24)

Score: 56/65 (86.15%)

  • CDA – Development with AWS Services: 85.71%
  • CDA – Security: 100%
  • CDA – Deployment: 81.08%
  • CDA – Troubleshooting and Optimization: 91.67%

Domain 1: Development with AWS Services

NoQARef
1Replace spreadsheet-based tracking system. DynamoDB.EDA: DynamoDB Streams + Lambda + SNS
2Collect real-time user dataKinesis Data Streams
3API Gateway: Lambda Proxy integrationRecommend: Simple setup
4CodeCommit, CodeBuild, CodeDeploy, CodePipeline. A central dashboard?CodeStar
5Cfn: Reuse value from a stack?Outputs/Export & Fn::ImportValue
6Hundreds of thousands of reads/writes per second. Which database?DynamoDB
7DynamoDB: Bidding system.DynamoDB Streams + Lambda + Conditional Write
8DynamoDB: Query a single tableLSI (when create the table)
9DynamoDB: Throttled. Hot partition. Fix minimal effort?Refactor to evenly distribute between partitions; Retries with exponential backoff
10CodeCommit: Setup?1. Git credential - HTTPS (username/password); 2. SSH connection (SSH key-pair)
11DynamoDB: 1.5KB. Write 100 items/s. WCU 100 but throttled. Fix?Increase WCU to 200.
12Deploy serverless app: Run C++Lambda doesn’t support C++ -> Create custom runtime
13SQS: Duplicate messageSQS FIFO + SendMessage with DeduplicationID
14SQS: postpone delivery messages to queueDelay queue (not using visibility timeout)
15ECS: Place task between AZs?Spread
16ECS: EC2. Task placement?1. Cluster constraint; 2. Task placement constraint; 3. Task placement strategy
17Sync user data without your backend.Cognito Sync (delegated use AppSync)
18Kinesis Data Streams: Resharding, Scaling, and Parallel Processing1. One worker can process many shards. 2. Optimal ratio is 1 worker : 1 shard
Enhanced Fan-out: stream consumers receive their own 2MB/second pipe of read throughput per shard
19DynamoDB: Concurrency writeOptimistic Locking + Conditional Writes
20DynamoDB: For each request, return WCU consumed (base table & GSI)ReturnConsumedCapacity: NONE (default), TOTAL, INDEXES
21SQS: Config Dead Letter QueueJust provide ARN of the queue to DeadLetterConfig
22Elastic Beanstalk: Web app process large number of items from DynamoDB. Overload. Easiest fix?Use Batch operations for Get, Put, Delete
23DynamoDB: Send welcome mail for new user. How?DynamoDB Streams + Lambda + SNS
24DynamoDB: Table - FighterID (PK) - FilterTitle (SK). Query by other attributes?Create a GSI
25DynamoDB: + Elasticache. Write data if cache miss. Improve?Add write-through + TTL
26Kinesis Data Streams: 100 shards, Lambda (10 seconds/request, 50 items/seconds)Maximum of 100 Lambda concurrency = number of shards
27Cfn: How to automate the process of getting latest AMI?Use System Managers Parameter Store
28SQS: Process tool long & messages appear twiceIncrease visibility timeout
29CloudFront: Slow to login & 504Authentication@Edge + Origin fail over
30Lambda: Increase CPU?By increasing memory
31API Gateway: Implement APIs form current Swagger spec.Just import the OpenAPI/Swagger file.
32Microservice using Docker + Fine-grain controlECS
33Quickly deploy Node app (provisioning, load balancing, ASG…)Elastic Beanstalk
34Amplify: config?amplify.yaml
35S3: Cross-Region Replication. Fail. Why?Maybe Object Versioning is not enable
36S3: Upload Terabytes of data from over the worlds. Slow. Improve speed?S3 Transfer Acceleration
37API Gateway: Reuse same function for different stage (different DynamoDB table)Stage variable

1.3 API Gateway API integration type

Choose an API Gateway API integration type

API Gateway - API integration types:

  • AWS
    • Lambda non-proxy integration (Lambda custom integration): Need to specify how to map between method & integration
  • AWS Proxy
    • Lambda proxy integration (Recommend): Simple setup
      • API Gateway maps the entire client request to the input event parameter of the backend Lambda function
  • HTTP
  • HTTP Proxy
  • Mock

1.16 ECS task placement

Alt text

Alt text ECS Task Placement

  • Task placement: Which container instances to place task?

    • “Cluster constraint”: Which one satisfy CPU, memory, port (in task definition)?

    • A task placement constraint is a rule that’s considered during task placement.

      • Constraint type

        • distinctInstance
        • memberOf
      • Expression: defined in cluster query language (subject operator [argument])

        • Attribute:
          • Build-in attribute: e.g. ecs.availability-zone, ecs.instance-type
          • Optional attribute:
          • Custom attribute: stack

        e.g. attribute:ecs.availability-zone == us-east-1a

    • A task placement strategy is an algorithm for selecting container instances for task placement or tasks for termination: ECS supports 3 type of task placement strategy:

      • binpack: min unused CPU, memory
      • random
      • spread: evenly based on
        • : instanceId/host, attribute:ecs.availability-zone, …

Ref:

1.18 Kinesis Data Streams

https://aws.amazon.com/blogs/aws/kds-enhanced-fanout/

1.19 DynamoDB: Concurrency write

  • Atomic Counter: 🛣️ Any one can writes (The database use the previous value)
  • Optimistic locking & Conditional write: ⚠️ Many writes at a time (based on some condition)
  • Pessimistic locking: 🛑 1 write at a time. Wait for your turn

Domain 2: Security

NoQ hash-based message authentication code (HMAC) value of the encryption key in order to validate future requests.ARef
1API Gateway: Lambda authorizer - accepts header, query stringsRequest parameter-based authorizer (REQUEST authorizer)
2On-premise KMS, migrate to AWS. Key is store in dedicated hardwareCloudHSM
3S3: Upload small file + Use KMS key: OK. Upload big file (100GB): not OKAWS CLI use multipart upload for big files. It’s required the kms:Decrypt permission
4S3: SSE with KMS (using default KMS key). Which header?- x-amz-server-side-encryption: aws:kms
- Omit x-amz-server-side-encryption-aws-kms-key-id to use default KMS key for S3
5S3: SSE-C. How does it work?1. You manage key & give AWS the key each time you upload a file
1.1 x-amz-SSE-customer-algorithm/key/key-MD5
1.2 If you lose the key, you lose the object
2. AWS handle encryption:
2.1 AWS store a hash-based message authentication code (HMAC) value of the encryption key in order to validate future requests.
2.2 When you need the object, you request the object (& provide the encryption key)
2.3 AWS decrypt & give you back the decrypted object
6KMS: A file encrypted with data encryption key (DEK). How to decrypt the files locally?1. Use KMS’s Decrypt to decrypt the DEK
2. Use the plaintext DEK to decrypt the file (immediately erase the plaintext from memory after used)
7CodeDeploy: Platform: ECS - appspec.yamlappspec.yaml for ECS needs: TaskDefinition, ContainerImage, ContainerPort
8Share DB connection endpointSystems Manager Parameter Store secure string
9SSL certificate from 3rd party. Which service can store?AWS Certificate Manager (for unsupported regions, use IAM certificate store)

Domain 3: Deployment

NoQARef
1EC2: EBS-backed root volume. How to detach the root-volume?Stop the EC2 instance, then detach the root volume
2Elastic Beanstalk: Maintain compute resource while deploying. No downtime.Rolling with additional batch, Immutable3.2.1 3.2.2 3.2.3
3DynamoDB: 3.5KB. 150 eventually consistent reads/second. How many RCU?1 strongly read -> 1 RCU
1 eventually read -> 0.5RCU => 150 -> 75
File 3.5KB -> 1:1 => 75 RCU
4Lambda: Deployment package 80MB. What to do now?Split the dependencies to a layer
5SAM: How to use Cfn & include SAM?Use Cfn Transform & AWS:Serverless macro to process SAM template to Cfn template
6CodeDeploy deployment type (How the latest revision is deployed to instance?)1. In-place (EC2/On-Premises); 2. Blue/green3.5
7Cfn: Different accounts. How to manage update across all accounts?Use StackSets

3.2 Elastic Beanstalk Deployment policies

  • Deployment policies (aka deployment methods/strategies):
    • AllAtOnce (Default)
    • Rolling
    • Rolling with additional batch
    • Immutable
    • Traffic splitting (aka Canary)
    • Blue-green (with Swap environment URLs)

3.6 CodeDeploy deployment type

Overview of CodeDeploy deployment types CodeDeploy concepts

CodeDeploy can deploy application to 3 platform (called deployment platform):

  • EC2/On-Premises <= Needs CodeDeploy agent
  • ECS
  • Lambda

CodeDeploy make the latest application revision available on instance in a deployment group (a group of instances)

  • In-place deployment: only support EC2/On-Premise
  • Blue/green deployment

CodeDeploy supports 3 ways of routing traffic (via deployment configuration)

  • All-at-once: 100%
  • Canary: 2 increments: 10% + 90%
  • Linear: n% x m times

3.7 StackSets vs nested stack vs cross-stack reference

  • StackSets: create stacks in AWS accounts across regions by using a single CloudFormation template
  • Nested stack: reuse a template in multiple Cfn template
  • cross-stack reference: export values from one stack and use them in another (Output/Export & Fn::ImportValue)

Ref:

Domain 4: Troubleshooting and Optimization

NoQARef
1Collect trace from multiple backends, AWS SDK, SQL queries…AWS Distro for OpenTelemetry (supports collect from X-Ray)
2X-Ray: Insufficient permissions to use X-ray console to view service map, segments. Which manged policy?- AWSXrayReadOnlyAccess
- AWSXRayDaemonWriteAccess
- AWSXrayFullAccess
3API Gateway: Fetch latest data without caching (using Cache-Control: max-age=0 header). Which permission?Resource-based policy for execute-api:InvalidateCache action
4DynamoDB: Streams, EventBridge + Lambda every 36 hours. Missing data?DynamoDB Streams retention period is 24 hour. Only last 24 hours data is available
5Kinesis Data Streams: Increasing data flow. Scale up?Split-shard + (increase numbers of worker)
6S3: CORS config: <AllowOrigin>, <AllowedMethod>, <AllowedHeader>, <MaxAgeSeconds>3600</MaxAgeSeconds>MaxAgeSeconds: time in seconds that your browser can cache the response for a preflight request4.6
7API Gateway: Lambda. 504. No errors in CW. Why?Lambda function takes more than 30s (API Gateway timeout)
8RDS: Slow response (in peak time). Already optimize queries. Resolve?- Add Read Replica
- Add caching with Elasticache
9Latency-sensitive service. AWS Fargate, CloudFront, ALB. Too much unauthenticated users, increase CPU of Fargate. Fix?Use CloudFront Function (attach to Viewer Request) to authenticate users
10EC2: Monitor memory, swap. How?Install CW Agent
11Elastic Beanstalk: EC2. CW doesn’t show memory. Why?By default, CW doesn’t track EC2 instance memory
12Kinesis Data Steams: Producers restart -> Duplicate record. Fix?Call PutRecord with SequenceNumberForOrdering param.

Tutorial Dojo - DVA-C02 - Timed Mode Set 4

Test time: Dec 8 2023, 10h00 - 10h50 (00:50:00)

Score: 60/65 (92.3%):

  • CDA – Development with AWS Services 91.67% (33/36)
  • CDA – Security 90.91% (10/11)
  • CDA – Deployment 80% (4/5)
  • CDA – Troubleshooting and Optimization 100% (13/13)

Domain 1: Development with AWS Services

NoQARef
1Automatically watermark images uploaded to S3Use S3 Event Notification s3:ObjectCreate:Put. Send the event to Lambda function (destination)
2Lambda function: access RDS in private subnetConnect to the VPC
3API Gateway + Lambda: Map incoming request to integration request & vice versaAWS custom (Lambda custom)
4Which cache strategy ensured cached data is always up-to-date & stale data are automatically deleted?Write-through + With TTL1.4
5DynamoDD: How to prevent data overwritten?Optimistic locking + Conditional writes (check version number)
6Database credential: How to encrypted & auto-rotate?Use Secrets Manager + Enable Automatic Rotation
7S3: Use SQL to filter & retrieve only a subset data of an object?S3 Select (supports CSV, JSON, Apache Parquet & compressed CSV, JSON)1.7
8DynamoDB - GSI: Consumed throughput; Consistency?GSI has its own consumed throughput. GSI only supports eventually consistent read
9DynamoDB - GSI: How much throughput to provision?GSI WCU >= Base table WCU
10DynamoDB: 2KB items - 10 writes/s - 20 eventually consistent reads/s. How much RCU/WCU?2KB ➡️ 1 strongly consistent read = 1 RCU ➡️ 1 eventually = 0.5 RCU ➡️ 20 eventually = 10 RCU
2KB ➡️ 1 write = 2 WCU ➡️ 10 writes = 20 WCU
111 item = 17KB. 320 strongly consistent read/s. How much RCU?17KB/item ➡️ 5RCU/strongly consistent read ➡️ 320 strongly read = 320 x 5 = 1600 RCU
12HTML, JS, image, video. How to server with lowest latency around the world?S3 + CloudFront
13AI-based app built with Lambda. How to modify the way invocation event are read form Lambda runtime API?Use Lambda custom runtime
14Migrate monolith on-premise app to Lambda. Best practice?1. Take advantage of execution runtime; 2. Use environment variable…1.14 Lambda Best Practice
15ECS: Tasks are scheduled on instances with enough resources. Which task placement strategy?Random
16Online game - Sync app pref + state of player + Allow multiple player to share stateApp Sync (Cognito Sync not support shared data)
17AWS CLI in EC2 instance. How to easily switch role?1. Create a new CLI profile with credential; 2. Run aws CLI with --profile
18DynamoDB: Ensure item is updated only some attribute meets some conditionConditional writes
19DynamoDB: Debug throughput of both base table & GSI when update item?Call UpdateItem with ReturnConsumedCapacity set to None / Total / Indexes1.19 PutItem - ReturnConsumedCapacity
20DynamoDB Streams: How to integrate with Lambda?1. Create an EventSourceMapping to poll the DynamoDB stream, read & process records
2. Give Lambda function enough permission to interact with DynamoDB via ExecutionRole (AWSLambdaDynamoDBExecutionRole managed policy)
21Serverless app: Which service can manage configuration & deploy the whole stack + simple?AWS SAM (Serverless Application Model)
22DynamoDB: Table: ArticleName (PK) - Category (SK). Query ArticleName using another Sort Key + Strongly consistent readCreate a new table with Local Secondary Index (LSI). Migrate the existing data to new table (LSI cannot be created after the DynamoTB is created)
23S3: Ensure all objects are encrypted with AE256Use bucket policy to deny any Create request doesn’t have x-amz-server-side-encryption: AE256 header
24EC2: Shell script to get instance public/private IPUse Instance Metadata Service endpoint 169.254.169.254/latest/meta-data
25Lambda: Account concurrency limit 2000; 10 functions: 1 function 400, 1 function 200. The rest, the third?The rest: 1400; the third: 1300.
26Coordinate multiple services into serverless workflow. Which service?AWS Step Functions
27API Gateway: Enable caching. How to invalidate 1 key?Send the request with Cache-Control: max-age=0
28Lambda: Connection refused. Why?Maybe the invoke URL is wrong (http without s)
29Lambda: Improve performance?Increase memory will increase CPU too.
30Lambda: A function initialize DB connection every time it executes. How to optimize?Move the DB connection to shared execution context (outside handler)
31Lambda: Can the function built with Rust?Yes. Use custom runtime
32Lambda: A function fetch 20MB static data every time it executes. How to optimize?Place the initialize outside Lambda handler; saved external file to /tmp
33Deploy containerized apps? ECS, EKS or Elastic Beanstalk?Under the hood, Elastic Beanstalk uses ECS (& ELB, ASG)
34Online game. How to add feature to cross-sync profile data between device?Use Cognito Sync (or App Sync)
35DynamoDB: Which attribute to use as partition key?The partition should uniquely identify each item
36CodePipeline: Push build details into a DynamoDB?Use EventBridge & Lambda

1.4 Caching Strategies

What is it?ProsCons
Lazy-loadingLoads data into the cache only when necessary (catches cache misses on reads)Only requested data is cachedCache miss read penalty (3 trips)
Stale data
Write-throughLoads data into the cache whenever data is written to the database (populates data on writes)No stale dataMissing data (empty nodes)
No read penaltyCache churn (not re-used cache)
Lazy-loading (with TTL)An expired key is treated as not found
Write-through (with TTL)

Domain 2: Security

NoQARef
11 bucket - many users. How to redact PII & manage access permission?Use S3 Object Lambda (+) Access Point
2SSM Parameter Store: Notify if param haven’t been rotated for 90 days1. Use Advanced tier / Parameter polices / Notification policies
- NoChangeNotification After xxx
- ExpirationNotification Before xxx
- Expiration
2. Use EventBridge rule to filter & send NoChangeNotification event to a SNS topic (target)
3S3: Ensure data is encrypted at rest using the company key1. Client-Side Encryption (CSE) - Encrypt the data before send to S3
2. Server-Side Encryption (SSE) - Send the data with the encryption key
2.1 For CLI, Use the request headers: x-amz-server-side​-encryption-customer + algorithm/key/key-MD5
2.2 Or use the SDK
4KMS: Locally encrypt data (Envelope encryption)1. Use the GenerateDataKey API to get a data key.
2. Use the plaintext data key (GenerateDataKey response Plaintext) to encrypt data locally, then erase the plaintext data key from memory.
3. Store the encrypted data key (GenerateDataKey response CiphertextBlob) alongside the locally encrypted data.
5API Gateway: Custom authorizer using bearer token (same as SAML, OAuth). How?Use API Gateway Lambda authorizer (aka custom authorizer)2.5
- Token-based Lambda authorizer (aka TOKEN authorizer) 👈 THIS ONE
- Request parameter-based Lambda authorizer (aka REQUEST authorizer)
6Database credential + RotateSecrets Manager + Auto Rotation (How? Secrets Manager run a Lambda function )2.6
7CloudFormation: Retrieve license key + cost-effectiveSystems Manager Parameter Store + Secure String
8Migrate on-premise to AWS. Integrate LDAP directory service (not compatible with SAML)Implement a custom identity broker, which use STS to issue short-live AWS credentials2.8
9Cognito: Additional authentication methodIntegrate Multi-Factor Authentication (MFA) to Cognito User Pool
10SQL Server. Migrate to RDS. Encrypt data before write to disk & vice versa.Enable SQL Server Transparent Data Encryption
11S3. Someone use your image without permission.(Block public access) Use pre-signed URL / pre-signed cookies

Domain 3: Deployment

NoQARef
1SAM deploy process (From local machine)1. Build (local); 2. Package (“Publish” to S3); 3. Deploy (Use artifact on S3)
2Elastic Beanstalk: HA, revert quickly?1. Use any EB deployment strategy, e.g. All-at-once (fastest)
2. Blue-Green deployment (EB calls it swap environment URLs)3.2
3CloudFormation: Inline code in templateAWS::Lambda::Function / Code / ZipFile
4Serverless app: Zip code, upload to S3, produce package deployment-ready template & deploysam deploy (which includes sam package)
5CloudFormation: Install packages, start services on EC2 after provisionedcfn-init

3.1 SAM deploy process

npmsam
npm initsam init
npm install
npm buildsam build
npm publishsam package (deprecated, use sam deploy)
npm startsam deploy
- sam list endpoints
- curl http//:localhost:3000- curl https//<>.execute-api.<>.amazonaws.com
nodemon index.jssam sync –watch

sam deploy now implicitly performs the functionality of sam package

Ref:

Domain 4: Troubleshooting and Optimization

NoQARef
1Send traces to X-ray?Use X-Ray daemon (CloudWatch Agent can do this on EC2/On-Premise)
2SQS: Duplicate message. Fix?Use FIFO queue + provide deduplicationID
3X-Ray: Filter trace?1. Use web console; 2. Use GetTraceSummaries (support search)
4X-Ray: Send trace to X-Ray?- 1. Use X-Ray SDK (through X-Ray daemon); 2. Use X-Ray/CLI (directly)
- PutTraceSegments API accepts a single segment document with many segments
5Kinesis: Over-provision. Scale in?Merge cold shards
6API Gateway: Terminated Lambda. Why?- Lambda timeout: max 15min ➡️ terminated
- API Gateway timeout: 30s for an integration ➡️ 504 Timeout
7API Gateway: No metrics for CacheHitCount/CacheMissCountAPI Gateway caching is not enabled
8SQS injections, XSS attack. How to deal?Use Web Application Firewall (WAF). It works with: CloudFront, ALB, API Gateway (REST API)
9Kinesis: 10 shards - 10 EC2 instance. Increase to 20 shards, how many instances?20 instances, the number of instances match the number of shards by 1:1 ratio
10RDS: Monitor memory, CPU usages of processes?Use RDS enhanced monitoring
11CodePipeline: Code review in each stage before move to next stageUse a “manually approval” action, and send the approval request to a SNS topic
12X-Ray: Record call to DB, other services, SQL queries & filterAdd annotations in the subsegment section of the segment document.
13X-Ray: Permission to send trace to X-Ray?AWSXRayDaemonWriteAccess

4.1 How to send traces to X-ray?

  1. X-Ray daemon

    The AWS X-Ray daemon is a software application that listens for traffic on UDP port 2000, gathers raw segment data, and relays it to the AWS X-Ray API.

    The daemon works in conjunction with the AWS X-Ray SDKs and must be running so that data sent by the SDKs can reach the X-Ray service.

  2. AWS Distro for OpenTelemetry (ADOT) Collector

  3. (For EC2, On-premises) CloudWatch Agent can do this from 1.300025.0

4.1 Setup X-Ray daemon

  • Lambda: the deamon run automatically
  • EC2:
    • Elastic Beanstalk: Enable with XRayEnabled configuration option
    • EC2: Install/Run manually (May use user data)
    • ECS:
      • Use official Docker image
      • Build custom Docker image
  • On-premise: Install/Run manually

4.2 SQS: Duplicate messages

https://aws.amazon.com/about-aws/whats-new/2016/11/amazon-sqs-introduces-fifo-queues-with-exactly-once-processing-and-lower-prices-for-standard-queues/ https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html#SQS-SendMessage-request-MessageDeduplicationId

4.8 AWS WAF, AWS Firewall Manager, and AWS Shield Advanced

https://docs.aws.amazon.com/waf/latest/developerguide/what-is-aws-waf.html

4.9 Scale Kinesis Data Streams

To scale up processing in your application, you should test a combination of these approaches:

  • Increasing the instance size (because all record processors run in parallel within a process)
  • Increasing the number of instances up to the maximum number of open shards (because shards can be processed independently)
  • Increasing the number of shards (which increases the level of parallelism)

https://docs.aws.amazon.com/streams/latest/dev/kinesis-record-processor-scaling.html

4.10 Monitor RDS

  • CloudWatch (default): RDS automatically sends metrics to CloudWatch every minute (from hypervisor for the DB instance - “outside”)
  • RDS Enhanced Monitoring:
    • Gather metrics about the OS: processes, memory… (from an agent on the DB instance - “inside”)
    • Logs are sent to CloudWatch Logs

Differences between CloudWatch and Enhanced Monitoring metrics

4.11 Manage approval actions in CodePipeline

https://docs.aws.amazon.com/codepipeline/latest/userguide/approvals.html

Tutorial Dojo - DVA-C02 - Timed Mode Set 5

Test time: Dec 9, 2023 (14:30)

Score: 47/65 (72%):

  • CDA – Development with AWS Services 76.92% (20/26)
  • CDA – Security 61.54% (8/13)
  • CDA – Deployment 66.67% (6/9)
  • CDA – Troubleshooting and Optimization 76.47% (13/17)

Domain 1: Development with AWS Services

NoQARef
1Lambda: Debug - Return log stream for the function instanceUse context.logStreamName
2API Gateway & Lambda: New version. Smooth migrationUpdate Lambda function -> Deploy new version. Specify new ARN in API Gateway integration. Redeploy to new stage.
3Elastic Beanstalk: Path of config file/.ebextensions/xxx.config
4Lambda: Ephemeral storage/tmp
5Lambda: How to use Ruby?Ruby’s natively support
6CloudFront: Update image immediatelyUse file name versioning
7Cognito: Authentication with JWT1. Create User Pools
2. Create an authorizer with Cognito User Pool ID
3. Set token source for authorization (to the name of header store JWT)
8X-Ray: Group the traceSubsegment: breakdown segment & provide granular timing detail about downstream calls (to AWS services, HTTP APIs, SQL queries)
Annotations: key-pair values, indexed to used with filter expression 👉 group traces (with console) or call GetTraceSummaries API
Metadata: key-pair values (not-indexed)
9S3: Lowest costGlacier Deep Archive
10EC2: Run Apache web serverUse user-data to install and start Apache web server
11App host in 1 region. Re-create on other regions using AMI & CloudFormation. How?Use Cfn Mapping & FindInMap
12Serverless app. Application code & infrastructure code in Python. How?Use CDK and Python
13Step Functions: Handle error? Aggregate data in different states?Use Catch & ResultPath
14Step Functions: Break a task into multiple tasks (process synchronously)Step Functions state types:1.14
- Do some work: Task State & Parallel State
- Not do some work: Wait State, Pass State, Choice State, Map State, Success/Fail State.
15DynamoDB: Control access to individual items & attributes?Fine-grain access control with1.15
1. IAM policy
2. Condition keys,
2.1 dynamodb:LeadingKeys
2.2 dynamodb:Attributes
3. IAM substitution variable e.g. ${www.amazon.com:user_id}, ${graph.facebook.com:id}, and ${accounts.google.com:sub}
16Cognito: UI for login page missing brand logoCognito allows customization for: logo, CSS.
17SQS queue: messages larger than 256KB.Use Amazon S3, (for Java) Extended Client Library
18Lambda: Provide a public HTTPS endpoint & ensure it executes only if the request’s from valid user1. Use Lambda function URL1.18
2. Auth type:
- AWS_IAM
- NONE: The URL endpoint will be public
3. Implement your own authenticator logic in your function.
19In-house authentication system, support sync user data between devices/platformsCognito Identity Pools - Developer-authenticated identities:
- Use your own authenticated process
- Use Cognito to sync user data between devices/platforms
20API Gateway: Integrate a XML-based SOAP API. How?Use HTTP Integration:
- Integration Request: Map incoming request from JSON to XML (with mapping template)
- Integration Response: Map API response from XML back to JSON (with mapping template)
21Serverless: Send newsletter at 7-day interval. How?Use EventBridge Schedule Rule to create events at 7-day interval, sends the events to Lambda function target
22DynamoDB: Python call BatchGetItem return partial data. Why? Fix?- BatchGetItem use more than the provisioned throughput limit
- To fix this:
1. Increase provisioned throughput
2. Wait for the load to DynamoDB reduces & try again:
- Implement your own retries with exponential backoff algorithm
- Use AWS SDK to call BatchGetItem (comes with retries & exponential backoff)
23DynamoDB: Group multiple actions to multiple items to a one-or-nothing operation?Use TransactionWriteItems
24DynamoDB: When an item added to Customer table, dynamically update Payment table. How do it in real time?Enable DynamoDB Streams for Customer table, trigger a Lambda function to update Payment table
25ALB: Obtain all value of identical query parameter key.Enable multi-value headers
26ECS: 2 containers share logs. How?Define these 2 containers in 1 task definition, use EFS as a volume

Domain 2: Security

NoQARef
1S3: Encryption each files with different keys. Cost-effective, low overhead- SSE-S3: use the same key for all files.
- SSE-C & use KMS to create CMK for each files (CreateKey): not cost-effective (1CMK: 1$/month)
- SSE-KMS & Use KMS to generate DEK for each files (GenerateDataKey): 👈 THIS
2S3 bucket in production account. How to allow a user on dev account access?1. In prod acc, create an IAM role2.2
1.1 Give it just enough permission for its task)
2.2 Specify the dev account as a trusted entity
2. In dev acc, allow it to assume role of prod acc (created in step 1)
3. In dev acc, switch role to prod acc
3S3. Which service to allow user register/sign-in & upload/access images on S3.Cognito User Pools & Identity Pools
4Allow temporary access to EC2 & but still enforce MFA? Which STS API?STS GetSessionToken
5KMS features
6API Gateway: Regulate access to API & charge based on usageUsage Plan
7Best practice to manage access keyRemote all access key of root account, use IAM role for applications
8Most secure way to send CW logs in EC2 instance of ASG launch configuration- Create a new IAM role for the new Launch Configuration
- Launch Configuration (deprecated), use Launch Template.
9AWS CLI: UnauthorizedOperation error with encoded authorization message. What to do?Decode the message with STS decode-authorization-message2.9
10S3: Hundreds of thousands of objects. Turn on SSE-KMS. Performance degradation. Why?Requests to KMS are exceeded quota
11How to check permission of an IAM role?1. Use IAM Policy Simulator
2. Run AWS CLI with --dry-run
12Serverless app defined with Cloud Development Kit (CDK). How to test local?1. (From CDK template) “Synthesize” & output Cfn template with cdk synth2.12 What is CDK? 2.12 CDK toolkit commands
2. Invoke the Lambda function locally with sam invoke local (by emulating the Lambda execution environment.)2.12 sam local invoke
13Cognito Identity Pools: What does Cognito returns to authenticated/unauthenticated user?- For authenticated users: Cognito returns the token
- For unauthenticated users: Cognito returns a Cognito ID

2.4 Requesting temporary security credentials with Security Token Service (STS)

STS TokenWhat it does?Notes
AssumeRolecross-account delegation and federation through a custom identity brokerCross-account, MFA
AssumeRoleWithWebIdentityfederation through a web-based identity providerSSO
AssumeRoleWithSAMLfederation through an enterprise Identity Provider compatible with SAML 2.0
GetFederationTokenfederation through a custom identity brokerProxy app
GetSessionTokentemporary credentials for users in untrusted environmentsMFA

Ref:

2.5 KMS features

KMS features:

  • Create symmetric/asymmetric keys
  • Import symmetric keys
  • Rotate symmetric keys
  • Disable/Enable keys

Not a KMS features:

  • Import asymmetric keys
  • Rotate key in custom stores

Domain 3: Deployment

NoQARef
1CodeDeploy: S3 source. Deploy to EC2 fail during DownloadBundleThe EC2 instance profile don’t have permission to access S3 bucket
2CodeDeploy: RollbackCodeDeploy rolls back deployments by redeploying a previously deployed revision of an application as a new deployment (with new deployment ID)3.2
3Deploy to 3 environments: test, staging, production. How?Use 3 deployment groups, each for 1 environment.
4Elastic Beanstalk: Multi-container Docker. Which file to configure container definitions?Dockerrun.aws.json
5Elastic Beanstalk: Multi developers deploy without upload the whole project?Use eb deploy to deploy from local CodeCommit repo
6Serverless app defined with CDK. Deploy to new account. NoSuchBucket error. Fix?Run cdk bootstrap to provision resources for CDK deployment, e.g. IAM role, S3 bucket.
7CodeCommit: How to setup for a new user?Use AWS credential (with credential-helper)3.7
8CodeCommit: Forgot to pull master. Fix conflict?git rebase feature branch on master branch. Then manually fix conflict.
9SAM: How to deploy (& test)?1. (Once time) sam init
2. sam deploy

3.7 CodeCommit: Setup for new user

  • HTTPs Git credential (use username & password)

  • SSH connections (use public-private key pair)

    • Create public & private key pair on your local machine
    • Associate the public key with IAM user
  • Use AWS credential (profile)

    1. Use git-remote-commit (recommended)
    2. Use aws codecommit credential-helper

Domain 4: Troubleshooting and Optimization

NoQARef
1Lambda: Function created with Cfn doesn’t send logs to CW?Modify ExecutionRole & add AWSLambdaBasicExecutionRole managed policy
- (Attach to Lambda’s resourced-based policy won’t works)
- When created with Web Console, the console automatically add these policy to execution role for us
- With Cfn, we need to do it ourself.
2ECS: EC2 launch type. Terminate an instance (after it’s stopped), but the container instance still appear in ECS clusterTerminate an instance:
- In running state, it will be automatically deregistered with ECS cluster
= In stopped state, it won’t be
3CodeBuild: Run on a proxy server. RequestError when CodeBuild is accessed. Fix?
4API Gateway: Enable API caching. How to test the function without caching?0. Create a resource-based policy to allows the API Gateway execution service to invalidate the cache for requests on the specified resource4.4
1. Make a request with Cache-Control: max-age=0 header
5S3 - Event Notifications: Compress the images, but it takes too much time. Improve?Increase memory ➡️ increase CPU
6Debug latency of your app (with recently added function)? How to do with X-Ray?Define sug-segments inside the function to “instrument” (measure) it
7AWS CLI: Create snapshot of EC2 instance. InvalidInstanceID.NotFound. Why?Maybe the AWS CLI is using a profile for a different region
8Build a CI pipeline. Which AWS services?CodeCommit, Lambda, CodeBuild
9Step Functions: Handle & recover from State’s exception.Use Catch & Retry fields in state machine definition
10Lambda - Cold start: Optimize?1. Reduce pre-handler code
2. Increase CPU (by increasing memory)
11LAMP stack. Migrate to AWS?EC2 + Aurora/RDS
12Lambda: process file (5min). So slow?Change InvokeType to Event (asynchronous invocation)
13DynamoDB: Optimize Scan in low-demand time?Parallel scan: distribute workload across the partitions of the table (by passing Segment and TotalSegments parameters into the Scan operation)4.13
14Website (hosted on S3) call API Gateway. No "Access-Control-Allow-Origin" error. Fix?Config CORS for API Gateway to allow the website (S3)
15API Gateway + Lambda: Publish a new version of AccService:Prod with the alias AccService:Beta. How to test before promote?Create a BETA stage. Use stage variable to reference the beta function alias
16Lambda: Unable to import module. Fix?1. Install the missing module locally.
2. Package it with the handler or in a layer
3. Re-upload to Lambda
17Elastic Beanstalk: Keep the old code in S3 bucket. How?Change Retention to Retain source bundle in S3

Tutorial Dojo - DVA-C02 - Timed Mode Set xx

Test time: xx

Score: xx/65 (xx%):

  • CDA – Development with AWS Services xx%
  • CDA – Security xx%
  • CDA – Deployment xx%
  • CDA – Troubleshooting and Optimization xx%

Domain 1: Development with AWS Services

NoQARef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

Domain 2: Security

NoQARef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

Domain 3: Deployment

NoQARef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

Domain 4: Troubleshooting and Optimization

NoQARef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

Tutorial Dojo - DVA-C02 - Final Test

Test time: Dec 10, 2023 (19:30 - 20:05)

Score: 63/65 (96.92%):

  • CDA – Development with AWS Services 96.97% (32/33)
  • CDA – Security 90.91% (10/11)
  • CDA – Deployment 100% (5/5)
  • CDA – Troubleshooting and Optimization 100% (16/16)

Domain 1: Development with AWS Services

NoQARef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17Lambda: Use C++Build a custom runtime for C++1.17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

1.17 Lambda Custom Runtime

Lambda support 6 languages (through runtimes): Node, Python, Ruby, Java, .NET, Go.

You can use runtimes that Lambda provides, or build your own.

Domain 2: Security

NoQARef
1
2
3
4
5
6
7
8System Managers Parameter Store: Notify if a parameter hasn’t been rotated in 90 days.1. Use Advanced tier / Parameter polices / Notification policies
- NoChangeNotification After xxx
- ExpirationNotification Before xxx
- Expiration
9
10
11

Domain 3: Deployment

NoQARef
1
2
3
4
5

Domain 4: Troubleshooting and Optimization

NoQARef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

Tutorial Dojo - DVA-C02 - Summary

Domain 1: Development with AWS Services

NoQARef
I.4AWS SAM: shift traffic to new versionSAM Deployment strategy[SAM - Deploying gradually]
I.12Lambda: Response to user after 5 minLambda Invoke API InvocationType[Invoke - InvocationType]
I.14S3: Remove PII before return to applicationUse S3 Object Lambda to process object before return to application[S3 Object Lambda] [S3 Object Lambda Use with CloudFront]
I.18Only allow authorized clients to invalidate an API Gateway cache- API Gateway Additional settings / Per-key cache invalidation / Require authorization[Invalidate an API Gateway cache entry]
I.21Lambda: 50 requests/s; 100 s/request 👉️ 5.000 concurrency executionDefault quota of Lambda concurrency execution: 1.000 (can be increased to 10.000)
II.7Tracking number of visitors on website (use DynamoDB)1. (May over/under count) “Atomic counter” - just increase the counter without checking current value
II.8Kinesis Data Streams: Duplicate Records- Two primary reasons: 1. Producer retries; 2. Consumer retries.[Handling Duplicate Records - Kinesis]
II.9X-Ray: Include info about calls to AWS servicesInclude sub-segment in the segment document
II.10DynamoDB: Forum (PK) - Subject (SK) - LastPostUpdateTime. Finds on posts of a forum in last 3 monthsAdd LSI: Forum (PK) - LastPostUpdateTime (SK). Use Query operation.
II.19Elastic Beanstalk: Deploy infrastructure has an RDS instance coupling with EB. How to migrate RDS?1. Create RDS snapshot; enable RDS deletion protection
II.31Lambda: Concurrency quotas- Account-level: 1.000 unit of concurrency[Lambda Concurrency Quotas]
II.33Elastic Beanstalk: Environment manifest (environment name, solution stack…)- Environment manifest: /env.yaml[Environment manifest (env.yaml) - Elastic Beanstalk]
III.3API Gateway: Lambda Proxy integrationRecommend: Simple setup
III.12Deploy serverless app: Run C++Lambda doesn’t support C++ -> Create custom runtime
III.14SQS: postpone delivery messages to queueDelay queue (not using visibility timeout)
III.16ECS: EC2. Task placement?1. Cluster constraint; 2. Task placement constraint; 3. Task placement strategy
III.18Kinesis Data Streams: Re-sharding, Scaling, and Parallel Processing1. One worker can process many shards. 2. Optimal ratio is 1 worker : 1 shard
III.19DynamoDB: Concurrency writeOptimistic Locking + Conditional Writes
III.20DynamoDB: For each request, return WCU consumed (base table & GSI)ReturnConsumedCapacity: NONE (default), TOTAL, INDEXES
IV.8DynamoDB - GSI: Consumed throughput; Consistency?GSI has its own consumed throughput. GSI only supports eventually consistent read
IV.15ECS: Tasks are scheduled on instances with enough resources. Which task placement strategy?Random
IV.33Deploy containerized apps? ECS, EKS or Elastic Beanstalk?Under the hood, Elastic Beanstalk uses ECS (& ELB, ASG)
V.1Lambda: Debug - Return log stream for the function instanceUse context.logStreamName
V.8X-Ray: Group the traceSubsegment: breakdown segment & provide granular timing detail about downstream calls (to AWS services, HTTP APIs, SQL queries)
V.14Step Functions: Break a task into multiple tasks (process synchronously)Step Functions state types:[1.14]
V.18Lambda: Provide a public HTTPS endpoint & ensure it executes only if the request’s from valid user1. Use Lambda function URL[1.18]
V.19In-house authentication system, support sync user data between devices/platformsCognito Identity Pools - Developer-authenticated identities:
V.22DynamoDB: Python call BatchGetItem return partial data. Why? Fix?- BatchGetItem use more than the provisioned throughput limit
VI.17Lambda: Use C++Build a custom runtime for C++[1.17]

Domain 2: Security

NoQARef
I.1Give a program to AWS services- Best practice: EC2 instance profile (IAM Role)
I.3Database credential - How to encrypt & auto rotate?- AWS Secret Manager + Enable auto rotate
I.8S3 - Ensure all objects are encryption at rest with SSE-KMSAdd a bucket policy which denies any s3:PutObject action unless the request includes the x-amz-server-side-encryption header.
II.6Provide application in ECS access to the required AWS resourcesFargate: IAM Role -> attach to task
II.7KMS: Envelope Encryption1. encrypt plaintext data with a data key
IV.11 bucket - many users. How to redact PII & manage access permission?Use S3 Object Lambda (+) Access Point
V.1S3: Encryption each files with different keys. Cost-effective, low overhead- SSE-S3: use the same key for all files.
V.5KMS features
V.9AWS CLI: UnauthorizedOperation error with encoded authorization message. What to do?Decode the message with STS decode-authorization-message[2.9]
V.12Serverless app defined with Cloud Development Kit (CDK). How to test local?1. (From CDK template) “Synthesize” & output Cfn template with cdk synth[2.12 What is CDK?] [2.12 CDK toolkit commands]
V.13Cognito Identity Pools: What does Cognito returns to authenticated/unauthenticated user?- For authenticated users: Cognito returns the token
VI.8System Managers Parameter Store: Notify if a parameter hasn’t been rotated in 90 days.1. Use Advanced tier / Parameter polices / Notification policies

Domain 3: Deployment

NoQARef
I.1Implement subscription with API GatewayUse usage plan to distribute APIs & throttle usages based on defined limit/quota[API Gateway - Usage plan]
I.2Lambda, pause task & wait for external processStep Function - Callback pattern (SQS + SNS + Lambda)[Step Function - Callback Pattern]
I.5SAM template requires sectionsTransform & Resources
I.6Create Lambda function with CLI error InvalidParameterValueExceptionInvalid parameter: maybe a role can’t be assumed
I.7ECS schedule task based on CPU/memoryECS - Task placement strategy: binpack, spread, random
II.5CodeDeploy AppSpec - Run a task before traffic is shifted to a Lambda functionAppSpec hook
III.6CodeDeploy deployment type (How the latest revision is deployed to instance?)1. In-place (EC2/On-Premises); 2. Blue/green
IV.1SAM deploy process (From local machine)1. Build (local); 2. Package (“Publish” to S3); 3. Deploy (Use artifact on S3)
V.2CodeDeploy: RollbackCodeDeploy rolls back deployments by redeploying a previously deployed revision of an application as a new deployment (with new deployment ID)[3.2]
V.7CodeCommit: How to setup for a new user?Use AWS credential (with credential-helper)[3.7]
V.9SAM: How to deploy (& test)?1. (Once time) sam init

Domain 4: Troubleshooting and Optimization

NoQARef
I.6Serve private content from CloudFront1. Use signed-URL, sign-cookies
I.7X-ray: How to debug?_X_AMZN_TRACE_ID + AWS_XRAY_CONTEXT_MISSING
I.12CloudFront HTTPSViewer Protocol Policy: Only HTTPS or Redirect HTTP to HTTPS
I.14DynamoDB Scan improve performance- Default page size: 1MB (Max) -> Reduce page size
I.19Use Lambda function inside a VPC- By default, Lambda is public (has internet access)
I.20X-Ray filter trace1. Add annotation to record data used to group traces (indexed to used with filter expression)
I.22API Gateway: Lambda Proxy - 502 Bad GatewayIn Lambda proxy integration, the backend Lambda function must return output according a JSON format[Output format of a Lambda function for proxy integration]
II.5Kinesis Data Streams: Not enough shards & Instances CPU 100%1. Increase number of shards (shard splitting). 2. Increase instance size
II.6RDS can’t handle read1. Use RDS Multi-AZ Cluster (not Multi-AZ Instance)
II.7X-Ray - namespace, metadataX-Ray namespace: distinguish AWS/remote
II.8CloudWatch - namespaceCloudWatch namespace: container for metrics, e.g. aws/lambda
III.1Collect trace from multiple backends, AWS SDK, SQL queries…AWS Distro for OpenTelemetry (supports collect from X-Ray)
V.1Lambda: Function created with Cfn doesn’t send logs to CW?Modify ExecutionRole & add AWSLambdaBasicExecutionRole managed policy
V.2ECS: EC2 launch type. Terminate an instance (after it’s stopped), but the container instance still appear in ECS clusterTerminate an instance:
V.4API Gateway: Enable API caching. How to test the function without caching?0. Create a resource-based policy to allows the API Gateway execution service to invalidate the cache for requests on the specified resource[4.4]
V.13DynamoDB: Optimize Scan in low-demand time?Parallel scan: distribute workload across the partitions of the table (by passing Segment and TotalSegments parameters into the Scan operation)[4.13]

Tutorial Dojo - DVA-C02 - Summary

Domain 1: Development with AWS Services

NoQA
I.1Improve performance of S3 uploadMultipart upload. How about Transfer Acceleration?
I.2Caching: Lazy-load & Write-through
I.3Lambda: Different parameter depends on environmentEnvironment variable (# Stage variable)
I.5API Gateway: same API Gateway for multiple environmentsStage variable
I.6CloudWatch Alarm: When to alarm?Period / Evaluation Periods / Data points to Alarm
I.7SAM: Nested applicationAWS::Serverless::Application
I.8Lambda deploy: Graduate increase traffic to new versionLambda supports traffic shifting for aliases (by setting traffic weight). (That’s why SAM have canary, linear deployment strategy )
I.9API Gateway: Map data for microservice (in container)Use HTTP integration (Not AWS or _PROXY)
I.10Database scale globally, handle frequent schema changesDynamoDB (not Aurora)
I.11API Gateway - TTL 300s. How client can invalidate cache?Send request with Cache-Control: max-age=0 header
I.13Session data store on DynamoDB. Delete session of logged out users?Use DynamoDB TTL (when will an item is eligible for expiration - in epoch time)
I.15Serve content based on location- CloudFront can add header about viewer location’s location (based on the viewer’s IP address).
I.16What to do after update Cfn template of a Lambda function?1. aws cloudformation package: Uploads local artifacts to S3, update Cfn template to reference these artifacts
I.17Multi-thread key-value cache storeElasticache for Memcached
I.19Process long-running tasksElastic Beanstalk worker environment (an HTTP request handler that EB invokes with an SQS queue)
I.20ECS: Where to config port for container?Task definition
I.22Can Lambda handle 10 requests/s (each request take 50s)500 concurrent execution (Lambda can handles without doing anything. The default limit is 1.000)
I.23DynamoDB table attributes: UserID (PK) - GameTitle (SK) - TopScore. Get max TopScore of each game?Create a Global Secondary Index: GameTitle (PK) - TopScore (SK). Query 1 item for each game in descending order.
I.24Kinesis Data Streams: How many worker is optimal to process a number of shards?1:1 ratio
I.25AWS CLI timeout when list bucket with 10.000 objectsAdd pagination parameter when use AWS CLI
I.26Permission to Create/Delete GitCommit reposcodecommit:CreateRepository & codecommit:DeleteRepository
I.27DynamoDB Streams: Send a copy of old item to S3StreamViewType: OLD_IMAGE
II.1RDS + Lambda + Translate text with Amazon Translate. Improve performance, reduce load to RDS?Use Lambda execution environment /tmp as cache store
II.2DynamoDB: Employee info. Which attribute use as primary key?employee_id
II.3Run a Lambda function every 30min?Use EventBridge Schedule Rule to create scheduled events -> target the Lambda function
II.4ECS integrate with API Gateway. Which integration make no intervention?HTTP_PROXY
II.5Which API to call to get permission (from a IAM Role) to interact with S3 APIAWS STS AssumeRole API (or AssumeRoleWithWebIdentity, AssumeRoleWithSAML) (optionally pass an SessionPolicy)
II.6Asynchronous invoke Lambda function with Invoke APIPass parameter InvocationType - Event
II.11DynamoDB: Write heavy - ProvisionedThroughputExceededException. Why?RCU/WCU of GSI is separate from base table
II.12CodeCommit: Permission to fetch, clone, pushcodecommit:GitPull, codecommit:GitPush
II.13Elastic Beanstalk: Deploy new version with CLIPackage app as zip/war file. Deploy with eb deploy (EB CLI is a different package. It’s not packaged with AWS CLI, not aws eb)
II.14Internal app: elastic, cost-effectiveDynamoDB, EC2 Spot Fleet
II.15Build an CI/CD to deploy to both EC2 & on-premise. Which service?CodeDeploy
II.16DynamoDB: 10 RCU, each item 4KB. How much read request/s the table can handle?10 RCU: 10 Strong Consistency Read - 20 Eventually Consistency Read
II.17Prototype microservices on ECS. Which task placement minimize cost?Binpack, random, spread
II.18Temporary AWS credential for both authenticated/unauthenticated. Which service?Cognito Identity Pool (Federated Identity)
II.20SQS: Duplicated messages. How to fix?For SQS, when call SendMessage API, add MessageDeduplicationId param
II.21DynamoDB: Protect from overwritten?Implement optimistic locking with version number (ensure update the right version item)
II.22Lambda: Asynchronous invoke, exponential back-off, then send un-processed messages to another service.Lambda supports Dead Letter Queue (just as SQS DLQ)
II.23Collect visitor click to ads. Which service?DynamoDB: Use UpdateItem to implement atomic counter (Approximately ~ Add 1 to previous value)
II.24DynamoDB: Read 100 items. Which API?BatchGetItem (instead of GetItem) then BatchWriteItem
II.25DynamoDB: Store recent updated item automatically1. DynamoDB Streams + Lambda (not recommend)
II.26DynamoDB: Session data. Reduce storage without using provision throughputUse DynamoDB TTL
II.27Kinesis Data Streams: How to handle data flow (Scaling)?1. Split shards to increase stream capacity; 2. Merge shards to decrease stream capacity.
II.28Kinesis Data Streams: Consumer process every other day & store to S3. S3 only has half of the data?Kinesis Data Streams default retention period is 24h (up to 365 days)
II.29An AWS account has 2 Lambda function. 1 works optimal, 1 is throttled. Why?The reserve concurrency execution of function 1 is higher
II.30Lambda: Process events from S3 Events. 10 events/s, each event takes 3s. How much concurrency?Concurrency: number of in-flight request AWS Lambda function is handling at the same time.
II.32Protect AWS APIs call with MFAMFA-enabled IAM users must call GetSessionToken and submit an MFA code that is associated with their MFA device.
II.34Website hosted on S3 bucket_A, make GET request to S3 bucket_B. API calls are blocked by browsers?Enable CORS on bucket_B
II.35Migrate repos from Github to CodeCommit1. Create repos on CodeCommit; 2. Clone repos from Github; 3. Push to CodeCommit repos
II.36Lambda: Increase CPU?By increase memory
II.37ECS: Integrate with X-Ray. How to provide more granular timing information?Use sub-segment
II.38Version control system. Which service?CodeCommit
II.39API Gateway: Non-proxy integration with Lambda. How to ensure consumer include a query string?Use method request
III.1Replace spreadsheet-based tracking system. DynamoDB.EDA: DynamoDB Streams + Lambda + SNS
III.2Collect real-time user dataKinesis Data Streams
III.4CodeCommit, CodeBuild, CodeDeploy, CodePipeline. A central dashboard?CodeStar
III.5Cfn: Reuse value from a stack?Outputs/Export & Fn::ImportValue
III.6Hundreds of thousands of reads/writes per second. Which database?DynamoDB
III.7DynamoDB: Bidding system.DynamoDB Streams + Lambda + Conditional Write
III.8DynamoDB: Query a single tableLSI (when create the table)
III.9DynamoDB: Throttled. Hot partition. Fix minimal effort?Refactor to evenly distribute between partitions; Retries with exponential backoff
III.10CodeCommit: Setup?1. Git credential - HTTPS (username/password); 2. SSH connection (SSH key-pair)
III.11DynamoDB: 1.5KB. Write 100 items/s. WCU 100 but throttled. Fix?Increase WCU to 200.
III.13SQS: Duplicate messageSQS FIFO + SendMessage with DeduplicationID
III.15ECS: Place task between AZs?Spread
III.17Sync user data without your backend.Cognito Sync (delegated use AppSync)
III.21SQS: Config Dead Letter QueueJust provide ARN of the queue to DeadLetterConfig
III.22Elastic Beanstalk: Web app process large number of items from DynamoDB. Overload. Easiest fix?Use Batch operations for Get, Put, Delete
III.23DynamoDB: Send welcome mail for new user. How?DynamoDB Streams + Lambda + SNS
III.24DynamoDB: Table - FighterID (PK) - FilterTitle (SK). Query by other attributes?Create a GSI
III.25DynamoDB: + Elasticache. Write data if cache miss. Improve?Add write-through + TTL
III.26Kinesis Data Streams: 100 shards, Lambda (10 seconds/request, 50 items/seconds)Maximum of 100 Lambda concurrency = number of shards
III.27Cfn: How to automate the process of getting latest AMI?Use System Managers Parameter Store
III.28SQS: Process tool long & messages appear twiceIncrease visibility timeout
III.29CloudFront: Slow to login & 504Authentication@Edge + Origin fail over
III.30Lambda: Increase CPU?By increasing memory
III.31API Gateway: Implement APIs form current Swagger spec.Just import the OpenAPI/Swagger file.
III.32Microservice using Docker + Fine-grain controlECS
III.33Quickly deploy Node app (provisioning, load balancing, ASG…)Elastic Beanstalk
III.34Amplify: config?amplify.yaml
III.35S3: Cross-Region Replication. Fail. Why?Maybe Object Versioning is not enable
III.36S3: Upload Terabytes of data from over the worlds. Slow. Improve speed?S3 Transfer Acceleration
III.37API Gateway: Reuse same function for different stage (different DynamoDB table)Stage variable + mapping template
IV.1Automatically watermark images uploaded to S3Use S3 Event Notification s3:ObjectCreate:Put. Send the event to Lambda function (destination) (# S3 Object Lambda)
IV.2Lambda function: access RDS in private subnetConnect to the VPC
IV.3API Gateway + Lambda: Map incoming request to integration request & vice versaAWS custom (Lambda custom)
IV.4Which cache strategy ensured cached data is always up-to-date & stale data are automatically deleted?Write-through + With TTL
IV.5DynamoDD: How to prevent data overwritten?Optimistic locking + Conditional writes (check version number)
IV.6Database credential: How to encrypted & auto-rotate?Use Secrets Manager + Enable Automatic Rotation
IV.7S3: Use SQL to filter & retrieve only a subset data of an object?S3 Select (supports CSV, JSON, Apache Parquet & compressed CSV, JSON)
IV.9DynamoDB - GSI: How much throughput to provision?GSI WCU >= Base table WCU
IV.10DynamoDB: 2KB items - 10 writes/s - 20 eventually consistent reads/s. How much RCU/WCU?2KB ➡️ 1 strongly consistent read = 1 RCU ➡️ 1 eventually = 0.5 RCU ➡️ 20 eventually = 10 RCU
IV.111 item = 17KB. 320 strongly consistent read/s. How much RCU?17KB/item ➡️ 5RCU/strongly consistent read ➡️ 320 strongly read = 320 x 5 = 1600 RCU
IV.12HTML, JS, image, video. How to server with lowest latency around the world?S3 + CloudFront
IV.13AI-based app built with Lambda. How to modify the way invocation event are read form Lambda runtime API?Use Lambda custom runtime
IV.14Migrate monolith on-premise app to Lambda. Best practice?1. Take advantage of execution runtime; 2. Use environment variable…
IV.16Online game - Sync app pref + state of player + Allow multiple player to share stateApp Sync (Cognito Sync not support shared data)
IV.17AWS CLI in EC2 instance. How to easily switch role?1. Create a new CLI profile with credential; 2. Run aws CLI with --profile
IV.18DynamoDB: Ensure item is updated only some attribute meets some conditionConditional writes
IV.19DynamoDB: Debug throughput of both base table & GSI when update item?Call UpdateItem with ReturnConsumedCapacity set to None / Total / Indexes
IV.20DynamoDB Streams: How to integrate with Lambda?1. Create an EventSourceMapping to poll the DynamoDB stream, read & process records
IV.21Serverless app: Which service can manage configuration & deploy the whole stack + simple?AWS SAM (Serverless Application Model)
IV.22DynamoDB: Table: ArticleName (PK) - Category (SK). Query ArticleName using another Sort Key + Strongly consistent readCreate a new table with Local Secondary Index (LSI). Migrate the existing data to new table (LSI cannot be created after the DynamoTB is created)
IV.23S3: Ensure all objects are encrypted with AE256Use bucket policy to deny any Create request doesn’t have x-amz-server-side-encryption: AE256 header
IV.24EC2: Shell script to get instance public/private IPUse Instance Metadata Service endpoint 169.254.169.254/latest/meta-data
IV.25Lambda: Account concurrency limit 2000; 10 functions: 1 function 400, 1 function 200. The rest, the third?The rest: 1400; the third: 1300.
IV.26Coordinate multiple services into serverless workflow. Which service?AWS Step Functions
IV.27API Gateway: Enable caching. How to invalidate 1 key?Send the request with Cache-Control: max-age=0
IV.28Lambda: Connection refused. Why?Maybe the invoke URL is wrong (http without s)
IV.29Lambda: Improve performance?Increase memory will increase CPU too.
IV.30Lambda: A function initialize DB connection every time it executes. How to optimize?Move the DB connection to shared execution context (outside handler)
IV.31Lambda: Can the function built with Rust?Yes. Use custom runtime
IV.32Lambda: A function fetch 20MB static data every time it executes. How to optimize?Place the initialize outside Lambda handler; saved external file to /tmp
IV.34Online game. How to add feature to cross-sync profile data between device?Use Cognito Sync (or App Sync)
IV.35DynamoDB: Which attribute to use as partition key?The partition should uniquely identify each item
IV.36CodePipeline: Push build details into a DynamoDB?Use EventBridge & Lambda
V.2API Gateway & Lambda: New version. Smooth migrationUpdate Lambda function -> Deploy new version. Specify new ARN in API Gateway integration. Redeploy to new stage.
V.3Elastic Beanstalk: Path of config file/.ebextensions/xxx.config
V.4Lambda: Ephemeral storage/tmp
V.5Lambda: How to use Ruby?Ruby’s natively support
V.6CloudFront: Update image immediatelyUse file name versioning
V.7Cognito: Authentication with JWT1. Create User Pools
V.9S3: Lowest costGlacier Deep Archive
V.10EC2: Run Apache web serverUse user-data to install and start Apache web server
V.11App host in 1 region. Re-create on other regions using AMI & CloudFormation. How?Use Cfn Mapping & FindInMap
V.12Serverless app. Application code & infrastructure code in Python. How?Use CDK and Python
V.13Step Functions: Handle error? Aggregate data in different states?Use Catch & ResultPath
V.15DynamoDB: Control access to individual items & attributes?Fine-grain access control with
V.16Cognito: UI for login page missing brand logoCognito allows customization for: logo, CSS.
V.17SQS queue: messages larger than 256KB.Use Amazon S3, (for Java) Extended Client Library
V.20API Gateway: Integrate a XML-based SOAP API. How?Use HTTP Integration:
V.21Serverless: Send newsletter at 7-day interval. How?Use EventBridge Schedule Rule to create events at 7-day interval, sends the events to Lambda function target
V.23DynamoDB: Group multiple actions to multiple items to a one-or-nothing operation?Use TransactionWriteItems
V.24DynamoDB: When an item added to Customer table, dynamically update Payment table. How do it in real time?Enable DynamoDB Streams for Customer table, trigger a Lambda function to update Payment table
V.25ALB: Obtain all value of identical query parameter key.Enable multi-value headers
V.26ECS: 2 containers share logs. How?Define these 2 containers in 1 task definition, use EFS as a volume

Domain 2: Security

NoQA
I.2Share DB endpointUse System Manager Parameter Store secure string
I.4API Gateway: Allow another account invoke via IAM Role1. From the other account, grant permission to interact with this API Gateway
I.5Grant permission to access only some path of a S3 bucketUse S3 bucket policy, with the policy statement Resource including the path
I.6Login with social site: Facebook…, then access to AWS serviceCognito Identity Pool (Federated Identity)
I.7S3 - Encrypt AE256x-amz-server-side-encryption: AE256
I.9KMS - Generate data key but not use immediatelyGenerateDataKeyWithoutPlaintext
II.1Cognito - Enforce MFA for suspicious login attemptUser Pool / Adaptive Authentication / Automatic risk response
II.2EC2 instance - Upload images to S3. How to give EC2 instance permission?IAM Role (Instance Profile)
II.3Dev needs to access Test/Prod accounts. How to give permission?Grant cross-account access:
II.4API Gateway - Lambda Authorizer: Implement one that same as OAuth, SAMLAPI Gateway - Lambda Authorizer (Custom Authorizer) has 2 types:
II.5EC2 instance has both credentials & Instance ProfileAWS CLI credentials precedence: CLI options > ENVVAR > Assumed Role > IAM Identity (/.aws/config) > Credential file (/.aws/credentials) > EC2 instance profile > Container credential
II.8S3 - Encryption using KMS-C. How to upload object?Include the headers: x-amz-server-side​-encryption​-customer- + algorithm/key/key-MD5
II.9IAM, SCP - How to test IAM policy?IAM Policy Simulator
III.1API Gateway: Lambda authorizer - accepts header, query stringsRequest parameter-based authorizer (REQUEST authorizer)
III.2On-premise KMS, migrate to AWS. Key is store in dedicated hardwareCloudHSM
III.3S3: Upload small file + Use KMS key: OK. Upload big file (100GB): not OKAWS CLI use multipart upload for big files. It’s required the kms:Decrypt permission
III.4S3: SSE with KMS (using default KMS key). Which header?- x-amz-server-side-encryption: aws:kms
III.5S3: SSE-C. How does it work?1. You manage key & give AWS the key each time you upload a file
III.6KMS: A file encrypted with data encryption key (DEK). How to decrypt the files locally?1. Use KMS’s Decrypt to decrypt the DEK
III.7CodeDeploy: Platform: ECS - appspec.yamlappspec.yaml for ECS needs: TaskDefinition, ContainerImage, ContainerPort
III.8Share DB connection endpointSystems Manager Parameter Store secure string
III.9SSL certificate from 3rd party. Which service can store?AWS Certificate Manager (for unsupported regions, use IAM certificate store)
IV.2SSM Parameter Store: Notify if param haven’t been rotated for 90 days1. Use Advanced tier / Parameter polices / Notification policies
IV.3S3: Ensure data is encrypted at rest using the company key1. Client-Side Encryption (CSE) - Encrypt the data before send to S3
IV.4KMS: Locally encrypt data (Envelope encryption)1. Use the GenerateDataKey API to get a data key.
IV.5API Gateway: Custom authorizer using bearer token (same as SAML, OAuth). How?Use API Gateway Lambda authorizer (aka custom authorizer)
IV.6Database credential + RotateSecrets Manager + Auto Rotation (How? Secrets Manager run a Lambda function )
IV.7CloudFormation: Retrieve license key + cost-effectiveSystems Manager Parameter Store + Secure String
IV.8Migrate on-premise to AWS. Integrate LDAP directory service (not compatible with SAML)Implement a custom identity broker, which use STS to issue short-live AWS credentials
IV.9Cognito: Additional authentication methodIntegrate Multi-Factor Authentication (MFA) to Cognito User Pool
IV.10SQL Server. Migrate to RDS. Encrypt data before write to disk & vice versa.Enable SQL Server Transparent Data Encryption
IV.11S3. Someone use your image without permission.(Block public access) Use pre-signed URL / pre-signed cookies
V.2S3 bucket in production account. How to allow a user on dev account access?1. In prod acc, create an IAM role
V.3S3. Which service to allow user register/sign-in & upload/access images on S3.Cognito User Pools & Identity Pools
V.4Allow temporary access to EC2 & but still enforce MFA? Which STS API?STS GetSessionToken
V.6API Gateway: Regulate access to API & charge based on usageUsage Plan
V.7Best practice to manage access keyRemote all access key of root account, use IAM role for applications
V.8Most secure way to send CW logs in EC2 instance of ASG launch configuration- Create a new IAM role for the new Launch Configuration
V.10S3: Hundreds of thousands of objects. Turn on SSE-KMS. Performance degradation. Why?Requests to KMS are exceeded quota
V.11How to check permission of an IAM role?1. Use IAM Policy Simulator

Domain 3: Deployment

NoQA
I.3Deploy Lambda with CodeDeployCodeDeploy deploy configuration:
I.4Build, test, deploy serverless appServerless Application Model (SAM)
II.1SAM: workflow redeploy1. sam build; 2. sam deploy
II.2Elastic Beanstalk: Dev/Test - Deploy ASAPEB deployment strategy: AllAtOnce
II.3SAM: deploy 10% every 10minSAM Linear 10min
II.4Lambda: package deployment take too much time to deploy? How increase deploy speed?Lambda package deployment quota (for a function) is 50 MB (zipped; includes runtimes, layer…)
II.6CloudFormation: Easiest way to deploy a hello_world lambda functionIncline the function in AWS::Lambda::Function Properties / Code / Zipfile
II.7Elastic Beanstalk: Upgrade from Java 7 to 8. Shift all traffic to the new one, revert if something’s wrongBlue/Green Deployment: EB AllAtOnce + EB swap environment URLs (EB will use Route 53 to swap CNAMEs)
II.8CodeDeploy: Deploy to where? How?CodeDeploy deploy configuration:
III.1EC2: EBS-backed root volume. How to detach the root-volume?Stop the EC2 instance, then detach the root volume
III.2Elastic Beanstalk: Maintain compute resource while deploying. No downtime.Rolling with additional batch, Immutable
III.3DynamoDB: 3.5KB. 150 eventually consistent reads/second. How many RCU?1 strongly read -> 1 RCU
III.4Lambda: Deployment package 80MB. What to do now?Split the dependencies to a layer
III.5SAM: How to use Cfn & include SAM?Use Cfn Transform & AWS:Serverless macro to process SAM template to Cfn template
III.7Cfn: Different accounts. How to manage update across all accounts?Use StackSets
IV.2Elastic Beanstalk: HA, revert quickly?1. Use any EB deployment strategy, e.g. All-at-once (fastest)
IV.3CloudFormation: Inline code in templateAWS::Lambda::Function / Code / ZipFile
IV.4Serverless app: Zip code, upload to S3, produce package deployment-ready template & deploysam deploy (which includes sam package)
IV.5CloudFormation: Install packages, start services on EC2 after provisionedcfn-init
V.1CodeDeploy: S3 source. Deploy to EC2 fail during DownloadBundleThe EC2 instance profile don’t have permission to access S3 bucket
V.3Deploy to 3 environments: test, staging, production. How?Use 3 deployment groups, each for 1 environment.
V.4Elastic Beanstalk: Multi-container Docker. Which file to configure container definitions?Dockerrun.aws.json
V.5Elastic Beanstalk: Multi developers deploy without upload the whole project?Use eb deploy to deploy from local CodeCommit repo
V.6Serverless app defined with CDK. Deploy to new account. NoSuchBucket error. Fix?Run cdk bootstrap to provision resources for CDK deployment, e.g. IAM role, S3 bucket.
V.8CodeCommit: Forgot to pull master. Fix conflict?git rebase feature branch on master branch. Then manually fix conflict.

Domain 4: Troubleshooting and Optimization

NoQA
I.1Move session data to AWS, 100% CPU, HAElastiCache for Redis
I.2sam local - Access denied1. aws configure --profile; 2. sam local invoke --profile
I.3Cost effective when using SQSLong polling (config ReceiveMessage WaitTime)
I.4Record all changes to a DynamoDB table to another oneDynamoDB Streams + Lambda (write to another DynamoDB table)
I.5DynamoDB - Reduce queriesDAX
I.8ECS store data in DynamoDB, how to verify each new items?DynamoDB Streams + Lambda
I.9API Gateway - 504504 Gateway timeout -> Integration timeout after 30s
I.10RDS - Too many connectionsRDS Proxy
I.11API Gateway timeout - Which CW metrics to watch?Latency, IntegrationLatency
I.13CloudFront - end-to-end SSLViewer Protocol Policy, Origin Protocol Policy: HTTPS
I.15Capture IP in/out of an VPCVPC Flow Log
I.16Elastic Beanstalk config for cron-jobcron.yaml
I.17DynamoDB - Fetch only some attributesUse projection attributes
I.18Lambda function download same big fileUse /tmp
I.21App deploy with Elastic Beanstalk - Config X-Ray.ebextensions/xray-daemon.config
II.1DynamoDB: ProvisionedThroughputExceededOptimize DynamoDB:
II.2X-Ray: View full trace without using consoleUse GetTraceSummaries, BatchGetTraces
II.3ECS + Docker app: How to setup tracing with X-Ray?- Run xray-daemon inside docker image
II.4AWS CLI - TimeoutUse pagination: --page-size (request less items) --max-items (show less items)
II.9X-Ray: From where, IP address is fetch?X-Forwarded-For header
III.2X-Ray: Insufficient permissions to use X-ray console to view service map, segments. Which manged policy?- AWSXrayReadOnlyAccess
III.3API Gateway: Fetch latest data without caching (using Cache-Control: max-age=0 header). Which permission?Resource-based policy for execute-api:InvalidateCache action
III.4DynamoDB: Streams, EventBridge + Lambda every 36 hours. Missing data?DynamoDB Streams retention period is 24 hour. Only last 24 hours data is available
III.5Kinesis Data Streams: Increasing data flow. Scale up?Split-shard + (increase numbers of worker)
III.6S3: CORS config: <AllowOrigin>, <AllowedMethod>, <AllowedHeader>, <MaxAgeSeconds>3600</MaxAgeSeconds>MaxAgeSeconds: time in seconds that your browser can cache the response for a preflight request
III.7API Gateway: Lambda. 504. No errors in CW. Why?Lambda function takes more than 30s (API Gateway timeout)
III.8RDS: Slow response (in peak time). Already optimize queries. Resolve?- Add Read Replica
III.9Latency-sensitive service. AWS Fargate, CloudFront, ALB. Too much unauthenticated users, increase CPU of Fargate. Fix?Use CloudFront Function (attach to Viewer Request) to authenticate users
III.10EC2: Monitor memory, swap. How?Install CW Agent
III.11Elastic Beanstalk: EC2. CW doesn’t show memory. Why?By default, CW doesn’t track EC2 instance memory
III.12Kinesis Data Steams: Producers restart -> Duplicate record. Fix?Call PutRecord with SequenceNumberForOrdering param.
IV.1Send traces to X-ray?Use X-Ray daemon (CloudWatch Agent can do this on EC2/On-Premise)
IV.2SQS: Duplicate message. Fix?Use FIFO queue + provide deduplicationID
IV.3X-Ray: Filter trace?1. Use web console; 2. Use GetTraceSummaries (support search)
IV.4X-Ray: Send trace to X-Ray?- 1. Use X-Ray SDK (through X-Ray daemon); 2. Use X-Ray/CLI (directly)
IV.5Kinesis: Over-provision. Scale in?Merge cold shards
IV.6API Gateway: Terminated Lambda. Why?- Lambda timeout: max 15min ➡️ terminated
IV.7API Gateway: No metrics for CacheHitCount/CacheMissCountAPI Gateway caching is not enabled
IV.8SQS injections, XSS attack. How to deal?Use Web Application Firewall (WAF). It works with: CloudFront, ALB, API Gateway (REST API)
IV.9Kinesis: 10 shards - 10 EC2 instance. Increase to 20 shards, how many instances?20 instances, the number of instances match the number of shards by 1:1 ratio
IV.10RDS: Monitor memory, CPU usages of processes?Use RDS enhanced monitoring
IV.11CodePipeline: Code review in each stage before move to next stageUse a “manually approval” action, and send the approval request to a SNS topic
IV.12X-Ray: Record call to DB, other services, SQL queries & filterAdd annotations in the subsegment section of the segment document.
IV.13X-Ray: Permission to send trace to X-Ray?AWSXRayDaemonWriteAccess
V.3CodeBuild: Run on a proxy server. RequestError when CodeBuild is accessed. Fix?
V.5S3 - Event Notifications: Compress the images, but it takes too much time. Improve?Increase memory ➡️ increase CPU
V.6Debug latency of your app (with recently added function)? How to do with X-Ray?Define sug-segments inside the function to “instrument” (measure) it
V.7AWS CLI: Create snapshot of EC2 instance. InvalidInstanceID.NotFound. Why?Maybe the AWS CLI is using a profile for a different region
V.8Build a CI pipeline. Which AWS services?CodeCommit, Lambda, CodeBuild
V.9Step Functions: Handle & recover from State’s exception.Use Catch & Retry fields in state machine definition
V.10Lambda - Cold start: Optimize?1. Reduce pre-handler code
V.11LAMP stack. Migrate to AWS?EC2 + Aurora/RDS
V.12Lambda: process file (5min). So slow?Change InvokeType to Event (asynchronous invocation)
V.14Website (hosted on S3) call API Gateway. No "Access-Control-Allow-Origin" error. Fix?Config CORS for API Gateway to allow the website (S3)
V.15API Gateway + Lambda: Publish a new version of AccService:Prod with the alias AccService:Beta. How to test before promote?Create a BETA stage. Use stage variable to reference the beta function alias
V.16Lambda: Unable to import module. Fix?1. Install the missing module locally.
V.17Elastic Beanstalk: Keep the old code in S3 bucket. How?Change Retention to Retain source bundle in S3

Exam note AWS DVA-C03

Queue/stream retention time

QueueMinRetention time
(Default)
MaxNote
SQS queue60s4 days14 daysNo addition charging
Kinesis Data Streams stream24h24h (One-day retention)365 daysExtended data retention: up to 7 days 💸
Long-term data retention: up to 365 days 💸💸
DB Streams queue-24h-Can’t be changed

Deployment strategy

3.2 Elastic Beanstalk Deployment policies

  • Deployment policies (aka deployment methods/strategies):
    • AllAtOnce (Default)
    • Rolling
    • Rolling with additional batch
    • Immutable
    • Traffic splitting (aka Canary)
    • Blue-green (with Swap environment URLs)

3.6 CodeDeploy deployment type

Overview of CodeDeploy deployment types CodeDeploy concepts

CodeDeploy can deploy application to 3 platform (called deployment platform):

  • EC2/On-Premises <= Needs CodeDeploy agent
  • ECS
  • Lambda

CodeDeploy make the latest application revision available on instance in a deployment group (a group of instances)

  • In-place deployment: only support EC2/On-Premise
  • Blue/green deployment

CodeDeploy supports 3 ways of routing traffic (via deployment configuration)

  • All-at-once: 100%
  • Canary: 2 increments: 10% + 90%
  • Linear: n% x m times