Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7175ec5e4f | ||
|
|
285081eeff | ||
|
|
9ecf3c0617 |
No files matched your search
@@ -24,4 +24,4 @@ description: Recompute and update PROGRESS.md (exercise completion, quiz accurac
|
||||
- **Mistake log**: one dated line per new misconception,
|
||||
- **Session log**: one line for today.
|
||||
3. Show the learner a 5-line summary: days left, today's wins, the top 3 weak spots, the next session's focus.
|
||||
4. Commit and push the update without asking (see AGENTS.md → "Progress protocol").
|
||||
Do not commit unless asked.
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: quiz
|
||||
description: Run an exam-style DVA-C02 quiz in chat, all questions in one message, on a topic, a domain or the learner's weak spots, using the repo's question bank plus original questions, with explanations, and log every answer. Use when the learner says "quiz me", "test me", "ask me questions about X".
|
||||
description: Run an exam-style DVA-C02 quiz in chat, one question at a time, on a topic, a domain or the learner's weak spots, using the repo's question bank plus original questions, with explanations, and log every answer. Use when the learner says "quiz me", "test me", "ask me questions about X".
|
||||
---
|
||||
|
||||
# /quiz — exam-style questions in chat
|
||||
@@ -26,18 +26,13 @@ Requested: $ARGUMENTS
|
||||
capitalization and remove gratuitous numbers. Never reproduce real exam questions.
|
||||
|
||||
## Ask
|
||||
- **All the questions in one message** (learner's request, 2026-11-10: waiting for each next question
|
||||
breaks their focus). Number them, show the id for bank questions, and do NOT reveal any answer.
|
||||
Mix the topics. End with the answer format: one line, e.g. `1D 2A 3BD 4C ...`.
|
||||
- Wait for all the answers, then correct them in ONE message:
|
||||
- a score line, then one compact line per correct answer (✔, the letter, the deciding keyword);
|
||||
- for each miss: ✘, the given and correct option(s), why the answer is right, why EACH distractor is
|
||||
wrong, the deciding keyword, and the book section.
|
||||
- If they mark an answer as a guess ("3B?"), still log it but note the uncertainty.
|
||||
- If they ask to go back to one question at a time, do that for the rest of the session.
|
||||
- One question at a time. Show the id for bank questions. Do NOT reveal the answer, and wait.
|
||||
- After the answer: ✔/✘, the correct option(s), why it is right, and why EACH distractor is wrong.
|
||||
Name the deciding keyword in the question. Point to the book section.
|
||||
- If they answer with a guess ("not sure, B?"), still log it but note the uncertainty.
|
||||
|
||||
## Log
|
||||
After the answers arrive, log every one of them (one Bash call with all the commands is fine):
|
||||
After each answer:
|
||||
- bank question: `uv run awslings record --qid <id> --given <letters>`
|
||||
- your question: `uv run awslings record --topic <slug> --domain <n> --result correct|wrong --note "<concept tested>"`
|
||||
|
||||
|
||||
@@ -12,12 +12,11 @@ description: Plan today's DVA-C02 study session from STUDY_PLAN.md and PROGRESS.
|
||||
- review items due today in the "Weak spots" table,
|
||||
- exercise progress: `uv run awslings list` (current exercise is marked ▶).
|
||||
3. Propose a session of about 60–90 minutes as a short checklist:
|
||||
- **Warm-up (5–10 min)**: 3–5 quick recall questions on the weak spots due today
|
||||
(ask them one at a time, then log them with `uv run awslings record`).
|
||||
- **Read (30–40 min)**: the chapter and sections, with 3 things to watch for in the exam.
|
||||
- **Practice (20–30 min)**: exercises to do (`uv run awslings`).
|
||||
- **Quiz (10–15 min)**: the only quiz of the session (learner's request, 2026-11-09: no warm-up,
|
||||
no separate section quizzes). About 10 questions in chat with `/quiz`: the day's topics, plus
|
||||
3–4 weak spots due today, asked as multiple choice, all in one message (learner's request,
|
||||
2026-11-10), corrected in one message, and logged with `uv run awslings record`.
|
||||
- **Check (10–15 min)**: the quiz command (`uv run awslings quiz <topic> -n 10`), or an in-chat quiz with `/quiz`.
|
||||
4. If they are behind schedule, say so plainly and suggest how to catch up: merge a review day,
|
||||
skip optional labs, shorten the reading by focusing on the "Exam tip" callouts. Remember that
|
||||
DVA-C02 cannot be taken after 30 Nov 2026.
|
||||
|
||||
Vendored
-11
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"editor.tabSize": 4,
|
||||
"editor.insertSpaces": true,
|
||||
"editor.detectIndentation": false,
|
||||
"autopep8.args": [
|
||||
"--max-line-length=200"
|
||||
],
|
||||
"black-formatter.args": [
|
||||
"--line-length=200"
|
||||
]
|
||||
}
|
||||
@@ -7,7 +7,7 @@ Codex reads it directly, Claude Code through `CLAUDE.md` (which imports it): the
|
||||
|
||||
## The learner
|
||||
|
||||
- Goal: pass **DVA-C02**, planned for **30 Nov 2026 at 14:00**. That is also the **hard deadline**, the last day
|
||||
- Goal: pass **DVA-C02**, planned for late November 2026. **Hard deadline: 30 Nov 2026**, the last day
|
||||
DVA-C02 can be taken (DVA-C03 starts 1 Dec 2026).
|
||||
- Level: some hands-on AWS experience. They need depth on exam details: limits, defaults,
|
||||
service selection, error codes, and the "why" behind best practices.
|
||||
@@ -17,8 +17,8 @@ Codex reads it directly, Claude Code through `CLAUDE.md` (which imports it): the
|
||||
|
||||
## At the start of every session
|
||||
|
||||
1. `git fetch` and pull if the current branch is behind its upstream: sessions are committed from
|
||||
other machines and tutors, so a stale checkout gives a wrong plan (it happened on 2026-11-02).
|
||||
1. `git fetch` and pull if the current branch is behind its upstream: sessions may be committed from
|
||||
other machines or tutors, and a stale checkout gives a wrong plan.
|
||||
2. Read `PROGRESS.md` (current day, weak spots, mistake log) and today's row in `STUDY_PLAN.md`.
|
||||
3. Work out the days left until the booked exam date (or until 2026-11-30 if none) and mention it
|
||||
when it is useful. Compute it from the system date, do not guess.
|
||||
@@ -32,8 +32,8 @@ Codex reads it directly, Claude Code through `CLAUDE.md` (which imports it): the
|
||||
they explicitly ask or after the third hint. The reference solutions live in `solutions/`
|
||||
(`awslings solution <name>` unlocks once an exercise is done). For exercises, start at level 2.
|
||||
- **Brief the APIs before each exercise**: the book omits many boto3 calls and parameter shapes the
|
||||
exercises need (learner, 2026-11-04: "impossible to do without asking for help"). Read the exercise,
|
||||
its tests and its hint in `exercises/info.toml`, then give the call names and formats, not the logic.
|
||||
exercises need. Read the exercise, its tests and its hint in `exercises/info.toml`, then give the call
|
||||
names and formats, not the logic.
|
||||
- **Never edit files in `exercises/` unless asked**, and never remove the `# I AM NOT DONE` marker for them.
|
||||
- **Always connect to the exam**: name the domain/task, the typical question pattern, the classic
|
||||
distractors, and the keyword that decides the answer ("LEAST operational overhead", "MOST
|
||||
@@ -73,9 +73,7 @@ Codex reads it directly, Claude Code through `CLAUDE.md` (which imports it): the
|
||||
- After a meaningful session (or on `/progress`), update PROGRESS.md: snapshot, domain table
|
||||
(from `uv run awslings stats`), chapter checkboxes, weak-spot queue, mistake log, session log.
|
||||
Keep it short and append. Do not rewrite history.
|
||||
- Commit and push without asking (learner's standing request, 2026-10-28): after updating PROGRESS.md or
|
||||
the quiz history, and after any finished change to the repo. Current branch only, one commit per block of
|
||||
work, never force-push.
|
||||
- Don't commit or push unless the learner asks.
|
||||
|
||||
## Repository map
|
||||
|
||||
@@ -87,7 +85,7 @@ Codex reads it directly, Claude Code through `CLAUDE.md` (which imports it): the
|
||||
| `quizzes/bank/*.yaml` | Question bank, one file per chapter (format: `quizzes/README.md`) |
|
||||
| `labs/` | Optional labs on a real AWS account: lab00 account setup, lab01 SAM API + canary, lab02 Cognito, lab03 S3 → EventBridge → Step Functions, lab04 CI/CD pipeline, lab05 observability, lab06 Beanstalk deployments (cost + teardown in each README) |
|
||||
| `EXAM_GUIDE.md` | Exam facts, domains → chapters/exercises/quiz topics, in-scope services, recent AWS changes |
|
||||
| `STUDY_PLAN.md` | Day-by-day plan, 27 Oct → 30 Nov 2026 |
|
||||
| `STUDY_PLAN.md` | Day-by-day plan, 22 Oct → 25 Nov 2026 |
|
||||
| `PROGRESS.md` | Learner state (maintained by you) |
|
||||
| `awslings/` | The CLI (runner, quizzes, mock exams, stats) |
|
||||
| `.claude/skills/` | Your skills: `today`, `quiz`, `explain`, `drill`, `check-exercise`, `mock-exam`, `progress`. Claude Code: `/today`. Codex: `$today`, through the `.agents/skills` symlink |
|
||||
|
||||
+37
-209
@@ -8,57 +8,53 @@
|
||||
| Item | Value |
|
||||
|---|---|
|
||||
| Exam | DVA-C02 — last possible day **2026-11-30** |
|
||||
| Exam date | **2026-11-30 at 14:00** (last possible day; booking confirmed by the learner, 2026-10-27). **Decided 2026-11-27: sitting on Monday whatever the mock #3 result** (no go/no-go, no DVA-C03 switch) |
|
||||
| ESL +30 accommodation | on the booking: 160 min instead of 130 (learner, 2026-10-27) |
|
||||
| Days off work | 3 full days (learner, 2026-11-02): two study days plus exam day. Thu 26 and Fri 27 Nov + Mon 30 Nov, confirmed. Timetable in STUDY_PLAN.md, blocks in Google Calendar |
|
||||
| Plan | STUDY_PLAN.md, started 2026-10-27 (re-planned for the 30 Nov exam) |
|
||||
| Session format | One quiz per session, at the end (learner, 2026-11-09): about 10 questions on the day's topics plus 3–4 due weak spots. No warm-up, no separate section quizzes. All questions in one message, answered in one line (`1D 2A 3BD ...`), corrected in one message (learner, 2026-11-10) |
|
||||
| Current plan day | **30 Nov (Mon, D35): exam day, 14:00.** Morning drill 12/15 (numbers 9/10; KMS grant, Beanstalk traffic splitting, Lambda async 6 h ✘). Learner asked for more: quiz 7/8 (`cicd-001` ✘) + drill 5/10 |
|
||||
| Holiday | Week of 9 Nov (learner, 2026-11-04): double sessions. Mon 9–Sun 15 Nov assumed, not confirmed. If Sat 14 and Sun 15 are normal days, 2 spare days instead of 4 |
|
||||
| Exercises done | 51 / 83 once `cfn_2`'s marker is removed (`awslings stats` shows 50 until then). 22 Nov: `cfn_2` (3 checks), `cicd_2` (3 checks); `sam_1` skipped. No more exercises planned |
|
||||
| Questions answered | 361 (71% overall, `awslings stats` 29 Nov). End quiz 2026-11-29: 16/20 (80%); 3 of the 4 misses were "X or Y" answers with the right letter in the pair. Numbers drill 2026-11-29: 8/19. Mock #2 re-check 2026-11-27: 4/4. Quick quiz 2026-11-26: 9/9 (D4 5/5, 4 weak spots ✔). Extra quiz 2026-11-24: 13/20 (D2 5/6, D3 3/8). End quiz 2026-11-23: 10/11. End quiz 2026-11-22: 10/12 (83%; Domain 2 5/5). End quiz 2026-11-21: 5/12 (42%). End quiz 2026-11-16: 11/12 (92%; 3A tentative; 8B/A wrong). Diagnostic 2026-10-27: 14/20 · warm-up 2026-10-28: 4/5 · foundations quiz 2026-10-28: 6/10 · warm-up 2026-10-29: 2/5 · warm-up 2026-10-31: 2/5 · iam_4 check question 0/1 · iam quiz 2026-10-31: 6/10 · sdk_1 check question 1/1 · warm-up 2026-11-02: 4/5 + endpoint retest 1/1 · sdk quiz 2026-11-02: 10/10 · warm-up 2026-11-04: 4/5 · s3 check questions 2026-11-04: 5/6 · warm-up 2026-11-07: 2/5 + KMS retest 0/1 · s3_5 check question 0/1 · warm-up 2026-11-08: 4/5 · end quiz 2026-11-10: 7/10 |
|
||||
| Labs | lab00 done 2026-11-02, checked with the CLI: root MFA on and no root keys, option B (IAM user `dva-admin` in `admins`, MFA, 1 access key), profile `dva-lab` in eu-west-3, Zero-Spend Budget with an email subscriber. **Delete the access key when the labs are finished.** Not checked: Free Tier usage alerts. SAM CLI not installed, needed from lab01 |
|
||||
| Mock exams | **#1 2026-11-26: 73% (41/56)**, D1 14/19 · D2 12/15 · D3 9/13 · D4 6/9, about 44 min. Interrupted by Ctrl+C at Q56: Q1–55 recovered from the terminal export, Q56 (`secrets-004`, C) given by the learner afterwards (session 9589956e). Both RCU questions (`dynamodb-001`, `-002`) were guesses (learner): 39/56 (70%) without them 9 unseen questions stay unseen. **#2 2026-11-27: 71% (46/65)**, all unseen: D1 16/21 · D2 13/17 · D3 11/16 · D4 6/11 (55%), 65 min (1 min/question, still too fast). 6 of 19 misses had the deciding keyword in the question (misread) |
|
||||
| AWS official practice | **2026-11-28: 65% (13/20)**, Official Practice Question Set, 30 min 45 s (1 min 32 s/question, pace target met). Misses: sticky sessions (2nd time since 27 Oct), Step Functions heartbeat, alias in event source mappings, symmetric key for the Database Encryption SDK, X-Ray before CloudWatch, appspec.yml location, DB connection outside the handler. 2 of 7 misses marked "Confident". Close to mock #2 on unseen questions (71% ≈ 14/20), so it does not suggest the mocks were inflated |
|
||||
| Readiness estimate | Not ready by the ≥ 80% rule, borderline: mocks 73% → 71% on unseen questions. D3 69% on both mocks, D4 55% on mock #2. Levers: slow down to ≥ 1.5 min/question (6 misreads on mock #2) and the built-in features missed (Access Analyzer, CodeArtifact, Distributed Map, SnapStart, CreationPolicy). Decide after mock #3 + the official practice set (Sat 28). **28 Nov:** official set 65% (13/20), consistent with the mocks: about 70%, below the 80% target, sitting Monday anyway (decided 27 Nov) |
|
||||
| Exam date booked | _not booked yet_ (suggested: 2026-11-25) |
|
||||
| ESL +30 accommodation | _not requested_ |
|
||||
| Plan | STUDY_PLAN.md, started 2026-10-22 |
|
||||
| Current plan day | D1 |
|
||||
| Exercises done | 0 / 83 |
|
||||
| Questions answered | 0 |
|
||||
| Mock exams | — |
|
||||
| AWS official practice | — (score/total and date, from AWS Skill Builder: see STUDY_PLAN D32) |
|
||||
| Readiness estimate | — |
|
||||
|
||||
## Domain readiness
|
||||
|
||||
| Domain | Weight | Accuracy (recent) | Trend | Status |
|
||||
|---|---|---|---|---|
|
||||
| 1. Development with AWS Services | 32% | 74% (39/53) | → | Mock #2 16/21: LSI vs GSI, stream view type, S3 replication, EventBridge replay, Distributed Map, container image size ✘. Mock #1 14/19 |
|
||||
| 2. Security | 26% | 72% (39/54) | ↑ | Mock #2 13/17: external ID, Access Analyzer policy generation, Cognito role mapping, SAM CRUD policy ✘. Mock #1 12/15 |
|
||||
| 3. Deployment | 24% | 66% (33/50) | → | Mock #2 11/16: exports vs nested stacks, CreationPolicy + `cfn-signal`, CodeBuild VPC config, CodeArtifact, image packaging ✘. Mock #1 9/13 |
|
||||
| 4. Troubleshooting and Optimization | 18% | 81% (35/43) | ↓ | Mock #2 **6/11**: gateway endpoint cost, CORS with proxy, Latency vs IntegrationLatency, `--use-container`, SnapStart ✘. Mock #1 6/9 |
|
||||
| 1. Development with AWS Services | 32% | — | | not started |
|
||||
| 2. Security | 26% | — | | not started |
|
||||
| 3. Deployment | 24% | — | | not started |
|
||||
| 4. Troubleshooting and Optimization | 18% | — | | not started |
|
||||
|
||||
## Chapters
|
||||
|
||||
| Chapter | Read | Exercises | Quiz | Confidence (1–5) |
|
||||
|---|---|---|---|---|
|
||||
| ch00 Exam strategy | ☑ | — | — | 4 |
|
||||
| ch01 AWS foundations | ☑ | — | ☑ 6/10 | 4 |
|
||||
| ch02 IAM | ☑ ("Check yourself" not done) | 5/5 | ☑ 6/10 | |
|
||||
| ch03 CLI, SDKs, STS | ☑ (end of the reading not confirmed; "Check yourself" not done) | 6/6 | ☑ 10/10 | |
|
||||
| ch04 S3 | ☑ | 7/7 | ☑ 3/3 (end quiz 10 Nov) | |
|
||||
| ch05 Lambda | ☑ | 5/5 | ☑ 2/3 (end quiz 10 Nov) | |
|
||||
| ch06 API Gateway & AppSync | ☑ | 4/4 | ☑ 0/1 (end quiz 16 Nov; authorizer review due) | |
|
||||
| ch07 DynamoDB | ☐ (reading not confirmed) | 9/9 | ☑ 1/1 (end quiz 16 Nov) | |
|
||||
| ch08 Caching, databases, CloudFront | ☐ (reading not confirmed) | 3/3 | ☑ 2/2 (end quiz 16 Nov) | |
|
||||
| ch09 SQS, SNS, EventBridge | ☐ (reading not confirmed) | 6/6 | ☑ 4/4 (end quiz 16 Nov; polling tentative) | |
|
||||
| ch10 Kinesis & Step Functions | ☑ (learner, 21 Nov) | 0/5 (skipped, catch-up) | ☐ | |
|
||||
| ch11 Application patterns | ☑ (learner, 21 Nov) | 1/3 (skipped, catch-up) | ☐ | |
|
||||
| ch12 Cognito | ☑ (learner, 21 Nov) | 0/3 (skipped, catch-up) | ☐ | |
|
||||
| ch13 KMS & encryption | ☑ | 1/3 (`kms_2`; others skipped, catch-up) | ☑ 1/2 (end quiz 21 Nov) | |
|
||||
| ch14 Secrets & configuration | ☑ | 0/4 (skipped, catch-up) | ☑ 1/2 (end quiz 21 Nov) | |
|
||||
| ch15 CloudFormation & CDK | ☑ (22 Nov) | 1/2 (`cfn_2`) | ☑ 3/3 (end quiz 22 Nov) | |
|
||||
| ch16 SAM & serverless deployments | ☐ (skipped 22 Nov; tutor summary only) | 1/2 (`sam_1` skipped) | ☑ 0/2 (end quiz 22 Nov) | |
|
||||
| ch17 CI/CD | ☑ (22 Nov) | 1/3 (`cicd_2`) | ☑ 3/3 (end quiz 22 Nov) | |
|
||||
| ch18 Beanstalk & containers | ☑ (26 Nov) | 0/3 | ☑ 1/3 (24 Nov, unread) | |
|
||||
| ch19 Testing | ☑ (26 Nov) | 0/1 | ☑ 1/3 (24 Nov, unread) | |
|
||||
| ch20 Monitoring & logging | ☑ (23 Nov) | 0/5 | ☑ 3/3 (end quiz 23 Nov) | |
|
||||
| ch21 Tracing | ☑ (23 Nov) | 0/1 | ☑ 4/4 (end quiz 23 Nov) | |
|
||||
| ch22 Troubleshooting | ☑ (26 Nov, tables only) | — | ☑ 3/3 (24 Nov, unread) | |
|
||||
| ch23 Optimization | ☑ (26 Nov, tables only) | 0/2 | ☐ | |
|
||||
| ch00 Exam strategy | ☐ | — | — | |
|
||||
| ch01 AWS foundations | ☐ | — | ☐ | |
|
||||
| ch02 IAM | ☐ | 0/5 | ☐ | |
|
||||
| ch03 CLI, SDKs, STS | ☐ | 0/6 | ☐ | |
|
||||
| ch04 S3 | ☐ | 0/7 | ☐ | |
|
||||
| ch05 Lambda | ☐ | 0/5 | ☐ | |
|
||||
| ch06 API Gateway & AppSync | ☐ | 0/4 | ☐ | |
|
||||
| ch07 DynamoDB | ☐ | 0/9 | ☐ | |
|
||||
| ch08 Caching, databases, CloudFront | ☐ | 0/3 | ☐ | |
|
||||
| ch09 SQS, SNS, EventBridge | ☐ | 0/6 | ☐ | |
|
||||
| ch10 Kinesis & Step Functions | ☐ | 0/5 | ☐ | |
|
||||
| ch11 Application patterns | ☐ | 0/3 | ☐ | |
|
||||
| ch12 Cognito | ☐ | 0/3 | ☐ | |
|
||||
| ch13 KMS & encryption | ☐ | 0/3 | ☐ | |
|
||||
| ch14 Secrets & configuration | ☐ | 0/4 | ☐ | |
|
||||
| ch15 CloudFormation & CDK | ☐ | 0/2 | ☐ | |
|
||||
| ch16 SAM & serverless deployments | ☐ | 0/2 | ☐ | |
|
||||
| ch17 CI/CD | ☐ | 0/3 | ☐ | |
|
||||
| ch18 Beanstalk & containers | ☐ | 0/3 | ☐ | |
|
||||
| ch19 Testing | ☐ | 0/1 | ☐ | |
|
||||
| ch20 Monitoring & logging | ☐ | 0/5 | ☐ | |
|
||||
| ch21 Tracing | ☐ | 0/1 | ☐ | |
|
||||
| ch22 Troubleshooting | ☐ | — | ☐ | |
|
||||
| ch23 Optimization | ☐ | 0/2 | ☐ | |
|
||||
| ch24–26 Final review | ☐ | — | — | |
|
||||
|
||||
## Weak spots (review queue)
|
||||
@@ -67,182 +63,14 @@
|
||||
|
||||
| Topic | Why it is weak | Last reviewed | Next review |
|
||||
|---|---|---|---|
|
||||
| foundations (ch01) | Shared storage across AZs + Lambda = EFS. EBS (even Multi-Attach) is single-AZ; instance store is ephemeral | 2026-10-29 ✔ (not asked 2, 4, 7, 8 or 10 Nov, postponed) | 2026-11-17 |
|
||||
| iam (ch02) | Which principal: Lambda creates VPC ENIs with the execution role (`AWSLambdaVPCAccessExecutionRole`), not the caller's IAM user and not the function's resource-based policy (inbound: who may invoke). Outbound calls = execution role | 2026-11-08 ✔ (first ✔ after 3 misses) | 2026-11-17 |
|
||||
| iam (ch02/ch03) | Debugging "who am I": `aws sts get-caller-identity` (no permission needed), not `iam get-account-authorization-details` | 2026-11-02 ✔ (not asked 7, 8 or 10 Nov, postponed) | 2026-11-17 |
|
||||
| s3 (ch04) | Changing metadata in place is impossible: `CopyObject` onto the same key with `MetadataDirective` = `REPLACE`. System metadata (`ContentType` parameter) vs user metadata (`Metadata` dict, `x-amz-meta-*`). A presigned POST signs its own policy from `Conditions`: no bucket policy, no IAM syntax | 2026-11-07 ✔ (metadata `REPLACE`; presigned POST not asked; not asked 10 Nov, postponed) | 2026-11-17 |
|
||||
| s3 (ch04) | Versioned bucket: `Expiration` only adds a delete marker, the data stays as noncurrent versions (billed, invisible to `ListObjectsV2`) → `NoncurrentVersionExpiration`. Suspending versioning deletes nothing | 2026-11-08 ✔ (✘ 7 Nov) | 2026-11-17 |
|
||||
| lambda (ch05) | Throttling depends on the invocation type: synchronous over the concurrency limit → 429 `TooManyRequestsException` to the caller at once (the caller retries); asynchronous → Lambda keeps the event and retries for up to 6 h. Concurrency ≈ rps × duration (s) | 2026-11-24 ✘ (async: chose "S3 drops after three attempts") | 2026-11-25 |
|
||||
| apigw (ch06/ch12) | Valid Cognito user-pool token, no custom code → Cognito user pool authorizer. IAM/SigV4 requires AWS credentials; a resource policy does not validate the token; a Lambda authorizer is custom code | 2026-11-22 ✔ (first success after 2 misses) | 2026-11-25 |
|
||||
| kms (ch13) | `kms:ViaService` = key usable only through a named service (DynamoDB). Encryption context can be sent by a direct caller too, so it does not restrict the path | 2026-11-22 ✔ | 2026-11-25 |
|
||||
| secrets (ch14) | Rotation failures in the switch-over window → alternating users strategy (two DB users, needs a superuser secret). Single user = brief window where the old password is invalid | 2026-11-24 ✔ | 2026-11-27 |
|
||||
| streaming (ch10) | High volume (thousands/s), short (< 5 min), idempotent → Express workflow (at-least-once async). Standard = long, exactly-once, auditable, priced per transition | 2026-11-24 ✔ | 2026-11-27 |
|
||||
| sam (ch16) | `PreTraffic`/`PostTraffic` hooks report with `codedeploy:PutLifecycleEventHookExecutionStatus` (Succeeded/Failed); CodeDeploy does not read logs | 2026-11-24 ✔ | 2026-11-27 |
|
||||
| sam (ch16) | Front end, one environment per Git branch, PR previews, LEAST effort → Amplify Hosting | 2026-11-24 ✔ (first success after 2 misses) | 2026-11-27 |
|
||||
| messaging (ch09) | Empty SQS receives → long polling (`WaitTimeSeconds`); `DelaySeconds` delays message availability | 2026-11-21 ✔ (confident; 2nd success) | 2026-11-28 |
|
||||
| containers (ch18) | Beanstalk: a % of real traffic for an evaluation period with automatic rollback → traffic splitting (needs an ALB). Rolling with additional batch only keeps full capacity | 2026-11-30 drill ✘ (answered "canary" + Lambda aliases), quiz ✔ 30 min later | — (exam day) |
|
||||
| iam (ch02/ch03) | Narrow one assumed-role session per request → session policy in `AssumeRole`. A permissions boundary sits on the role and hits every session | 2026-11-30 drill ✔ | — (exam day) |
|
||||
| dynamodb (ch07) | RCU/WCU arithmetic: 1 RCU = 1 strongly consistent read/s of ≤ 4 KB (eventually consistent ×½, transactional ×2); 1 WCU = 1 write/s of ≤ 1 KB (transactional ×2); round each item up first | 2026-11-26 mock #1: right by luck (learner). Taught 26 Nov, practice 1/3 (WCU ✔, transactional ×2 forgotten ✘, per minute not converted ✘), then 2/2 on the retry | 2026-11-27 |
|
||||
| lambda (ch05) | Reserved concurrency = cap (protects a downstream DB); provisioned = pre-warmed, no cap. VPC function + internet → NAT gateway in a public subnet. SQS batch, one bad message → `ReportBatchItemFailures` + `batchItemFailures` (destinations are async only) | 2026-11-26 mock ✘✘✘, re-check ✘ (chose reserved for cold starts); VPC ways out (gateway endpoint / PrivateLink / NAT) retaught, 3/3 ✔ | 2026-11-27 |
|
||||
| patterns (ch15–17) | LEAST effort = the built-in feature: buildspec `env.secrets-manager`, manual approval action, EventBridge rule on pipeline state → SNS, SSM public parameter for the latest AMI, Lambda function URL | 2026-11-30 quiz: SSM AMI parameter ✔, `cfn-signal` ✔; `cicd-001` ✘ 3rd time (chose the pipeline variable again) | before the exam |
|
||||
| iam/kms (ch02/ch13) | `s3:ListBucket` on the bucket ARN, `GetObject` on `bucket/*`. AWS managed key: fixed policy, cannot be disabled → customer managed key with rotation | 2026-11-26 mock ✘✘, re-check ✔ (`ListBucket`/`PutObject` ARNs) | 2026-11-27 |
|
||||
| misc (ch10/ch19/ch21) | ms + several consumers + replay → Kinesis Data Streams. X-Ray default sampling = 1 req/s + 5%. Proxy events: missing query string = `null` | 2026-11-30 drill ✔ (X-Ray 1 req/s + 5%) | — (exam day) |
|
||||
| containers (ch18) | Image → web app with HTTPS, load balancing, scaling, no cluster → App Runner (closed to new customers; successor ECS Express Mode) | 2026-11-24 ✘ | 2026-11-25 |
|
||||
| dynamodb (ch07) | Strong reads on a 2nd sort key → LSI, only at table creation (GSI = eventual only, any time). Old + new value → stream `NEW_AND_OLD_IMAGES` | 2026-11-27 mock ✘✘, re-check ✔, refresh (learner asked) | 2026-11-28 |
|
||||
| cloudformation (ch15) | Independent lifecycles → Export + `!ImportValue`; nested = deployed together; StackSets = accounts/Regions. Wait for user data → `CreationPolicy` + `cfn-signal` | 2026-11-27 mock ✘✘, refresh | 2026-11-28 |
|
||||
| streaming (ch09/ch10) | Firehose = managed delivery to S3, no replay; Data Streams = custom consumers + replay; AWS/SaaS events + content routing + replay → EventBridge archive. Millions of S3 items → Distributed Map | 2026-11-27 mock ✘✘, refresh | 2026-11-28 |
|
||||
| foundations (ch01/ch23) | S3/DynamoDB traffic through NAT is billed per GB → gateway endpoints (free, no code change). Lambda in a public subnet gets no public IP | 2026-11-27 mock ✘, refresh | 2026-11-28 |
|
||||
| lambda (ch05) | Java cold starts, no idle cost → SnapStart (published versions). > 250 MB unzipped → container image (10 GB). Native libs → `sam build --use-container` | 2026-11-27 mock ✘✘✘, re-check ✔ (SnapStart) | 2026-11-28 |
|
||||
| s3 (ch04) | Replication: versioning on both buckets + IAM role, new objects only (Batch Replication for existing), storage class can differ, delete markers off by default | 2026-11-27 mock ✘, refresh | 2026-11-28 |
|
||||
| apigw (ch06/ch22) | Proxy integration → the function returns `Access-Control-Allow-Origin`. Latency ≫ IntegrationLatency → time inside API Gateway (authorizer, mapping) | 2026-11-27 mock ✘✘, re-check ✔ (latency) | 2026-11-28 |
|
||||
| caching (ch08) | Session state kept across devices or instances → external store (ElastiCache, or DynamoDB). Sticky sessions = one cookie on one device and one instance | 2026-11-29 ✔ (`patterns-007`) | 2026-12-02 |
|
||||
| lambda (ch05) | Event source mapping or API stays unchanged across releases → it targets the alias ARN, and the alias moves to the new version (an alias points to a version, never to another alias). DB connection reused → open it outside the handler (`lambda_2`) | 2026-11-30 drill ✔ (alias ARN), but release described as "roll back to an older alias": corrected, release = move the alias to v2 | — (exam day) |
|
||||
| kms (ch13) | Client-side encryption of DynamoDB items → AWS Database Encryption SDK + a **symmetric** KMS key (data keys need symmetric; asymmetric = sign/verify, or encryption outside AWS) | 2026-11-29 ✔ | 2026-12-02 |
|
||||
| xray (ch21) | Find the slow service among many, MOST quickly → X-Ray service map first, then CloudWatch metrics/logs on that service. Read both halves of each option: the order matters | 2026-11-29 ✔ | 2026-12-02 |
|
||||
| cicd (ch17) | CodeDeploy on EC2/on-premises: `appspec.yml` at the root of the revision (inside the bundle). Lambda/ECS: AppSpec can be given in the console or as a YAML/JSON file | 2026-11-29 ✔ (`cicd-017`) | 2026-12-02 |
|
||||
| kms (ch13) | Temporary access to a key, no key policy edit, clean removal → KMS grant (`CreateGrant`, then `RevokeGrant`/`RetireGrant`). A multi-Region replica is another key, not a permission | 2026-11-30 drill ✘ again (answered "new key, disable it after"), quiz ✔ 30 min later | — (exam day) |
|
||||
| containers (ch18) | ECS: task **execution** role = ECS agent before start (pull ECR image, fetch injected secrets, send logs). Task role = app code at runtime. "Fails to start" / `ResourceInitializationError` → execution role | 2026-11-30 drill ✔ | — (exam day) |
|
||||
| numbers (ch24) | DynamoDB item 400 KB · Kinesis shard 1 MB/s or 1,000 rec/s in, 2 MB/s out · SQS visibility 30 s / 12 h, retention 4 / 14 days, 256 KB · Lambda async 6 h · API Gateway 29 s → 504 · Express 5 min / Standard 1 year · CloudWatch Logs never expire · envelope = `GenerateDataKey` | 2026-11-29 drill 8/19 · 2026-11-30 drill 9/10 (async 6 h ✘), 2nd drill 5/10: sync payload 6 MB, long polling 20 s, stream retention 24 h, KMS `Encrypt` 4 KB, API Gateway cache 300 s / 3,600 s ✘ | before the exam |
|
||||
|
||||
22 Nov: four 21 Nov misses answered correctly → +3 days (25 Nov). The 17 Nov overdue items are left to mock #1 (Tue 24) instead of separate reviews. Reviews newly reinforced on 16 Nov: +1 / +3 / +7 days = 17 / 19 / 23 Nov. Older unasked items remain due, carried to 17 Nov. DeletionPolicy removed from the queue after successful reviews on 8 and 16 Nov; revisit in ch15. 24 Nov: SSE-KMS multipart, `LeadingKeys`, cross-account and Cognito PKCE/guest removed after two successful reviews.
|
||||
|
||||
## Mistake log
|
||||
|
||||
<!-- One line per misconception, ideally in the learner's own words. Example:
|
||||
- 2026-10-24 · iam · thought an IAM policy alone grants access to a KMS key → the key policy must allow it too. -->
|
||||
|
||||
<!-- Wording below is from the answers given (`caching-003`, `caching-005`, `dynamodb-015`, `messaging-008`, `cloudformation-002`, `foundations-003`), not the learner's own words. -->
|
||||
- 2026-10-27 · caching · chose ALB sticky sessions to stop users losing sessions → stickiness still loses them when an instance is replaced. Externalize state (ElastiCache, or DynamoDB).
|
||||
- 2026-10-27 · caching · chose more Aurora read replicas for "too many clients" from many Lambda functions → the connections hit the writer. RDS Proxy pools and multiplexes them.
|
||||
- 2026-10-27 · dynamodb · chose provisioned + reserved capacity for unknown, spiky traffic with no capacity management → on-demand.
|
||||
- 2026-10-27 · messaging · chose one SQS queue read by three services for independent copies → competing consumers: each message goes to ONE consumer. Fan-out is SNS → one SQS queue per service.
|
||||
- 2026-10-27 · cloudformation · chose a stack policy to keep a bucket when the stack is deleted → stack policies only guard updates. Use `DeletionPolicy: Retain`.
|
||||
- 2026-10-27 · foundations · chose keys in an encrypted file instead of fixing IMDS for SSRF → never swap temporary role credentials for long-term keys. Require IMDSv2 (session token).
|
||||
- Pattern (2026-10-27): 5 of 6 misses are "which managed feature fixes this": stateless state, connection pooling, capacity mode, fan-out, deletion policy. Say the constraint out loud before choosing.
|
||||
- 2026-10-28 · cloudformation · warm-up: again chose a stack policy to protect data when the stack is deleted (2nd miss) → stack policies only guard updates. Deleted → `DeletionPolicy: Retain` / `Snapshot`.
|
||||
- 2026-10-28 · foundations · chose EBS io2 Multi-Attach for files shared by an ASG across 3 AZs and a Lambda function → EBS lives in one AZ and Lambda cannot mount it. EFS.
|
||||
- 2026-10-28 · foundations · `foundations-004`: chose a NACL rule for the whole VPC CIDR. Learner: "I didn't think it could relate to the ASG" → the launch template attaches `app-sg` to every instance; the DB security group allows 5432 from `app-sg`.
|
||||
- 2026-10-28 · foundations · chose a gateway VPC endpoint for SQS (right after a correct gateway answer for DynamoDB) → gateway endpoints exist only for S3 and DynamoDB. SQS = interface endpoint.
|
||||
- 2026-10-28 · foundations · gave `ec2:CreateNetworkInterface` to the developer's IAM user → Lambda creates the ENIs with the execution role; the error message names it. Attach `AWSLambdaVPCAccessExecutionRole`.
|
||||
- Pattern (2026-10-28): 4 of 4 quiz misses picked the right mechanism with the wrong scope or target: EBS (one AZ), NACL (whole VPC), gateway endpoint (only S3/DynamoDB), IAM user (not the role). Check *where* and *for whom* the option applies.
|
||||
- 2026-10-29 · cloudformation · warm-up: chose `UpdateReplacePolicy: Retain` to keep RDS data when the stack is deleted (3rd miss) → it only acts when an update replaces the resource. Stack deleted → `DeletionPolicy: Snapshot` / `Retain`.
|
||||
- 2026-10-29 · foundations · warm-up: chose a gateway endpoint for SQS again (2nd miss) → gateway = S3 and DynamoDB only ("S and D"); everything else = interface endpoint.
|
||||
- 2026-10-29 · iam · warm-up: gave `ec2:CreateNetworkInterface` to the developer's IAM user again (2nd miss), although the error names the function's role → fix the execution role (`AWSLambdaVPCAccessExecutionRole`).
|
||||
- 2026-10-29 · iam · thought `LeadingKeys` on a GSI query = customer id + index name, so the query is allowed → it is the index's partition key value (`"SHIPPED"`), so it does not match the tag → denied (and that protects other customers' data).
|
||||
- 2026-10-30 · iam · `iam_3`: wrote the trust policy with `Resource` instead of `Principal`, and first used `create_policy` (managed) for the inline policy → trust policy = WHO (`Principal: {"Service": "lambda.amazonaws.com"}`); inline = `put_role_policy`. Also attached the role's own ARN as a `PolicyArn`.
|
||||
- 2026-10-31 · cloudformation · warm-up: chose a stack policy denying `Update:Delete` to keep a table when the stack is deleted (4th miss). Learner: "update:delete is not read during delete operations, only during update operations" → DeleteStack never reads the stack policy; `DeletionPolicy: Retain`.
|
||||
- 2026-10-31 · foundations · warm-up: gateway endpoint for SQS again (3rd miss), DynamoDB gateway right → a gateway endpoint is a route-table entry, S3 and DynamoDB only; SQS = interface endpoint (ENI, PrivateLink).
|
||||
- 2026-10-31 · iam · warm-up: thought `LeadingKeys` on a GSI query filters the results to the caller's tenant → IAM never filters, it allows or denies the whole request. The GSI partition key value (`due_date`) ≠ tag → denied. To make it work, the GSI partition key must be `tenant_id`.
|
||||
- 2026-10-31 · iam · `iam_4`: wrote a Deny condition for the good case twice ("client using tls", then `StringEquals` `aws:kms`) → a Deny's condition describes the request to BLOCK: `aws:SecureTransport` = `"false"`, `StringNotEquals` `aws:kms`. Also: `s3:insecureTransport` as an Action, `"Ressource"`, `Principal: {"Role": ...}` (→ `{"AWS": arn}`), positional args to boto3 (keywords only).
|
||||
- 2026-10-31 · kms · chose `kms:GenerateDataKey` to fix `AccessDenied` on `GetObject` of an SSE-KMS object → reading decrypts the data key: `kms:Decrypt`. GenerateDataKey is for writes.
|
||||
- 2026-10-31 · iam · `iam-003`: chose `sts:AssumeRole` for the pipeline user creating a Lambda function with an existing role → handing a role to a service = `iam:PassRole` on that role, by the caller.
|
||||
- 2026-10-31 · iam · `iam-002`: chose an SCP in account B "allowing" account A (with the bucket policy) → SCPs never grant. Cross-account = the execution role's identity policy + the bucket policy.
|
||||
- 2026-10-31 · iam · `iam-012`: chose `aws iam get-account-authorization-details` to see which identity the CLI uses → `aws sts get-caller-identity`.
|
||||
- 2026-10-31 · iam · thought `Principal: {"AWS": "arn:aws:iam::B:root"}` matches only B's root user → it trusts the whole account; B's own identity policy must still allow the developer (right outcome, wrong reason).
|
||||
- Pattern (2026-10-31): 3 of 4 quiz misses forgot the CALLER's own permission (PassRole, identity policy cross-account ×2). Same family as the 28–29 Oct "which principal" misses. Ask: which principal makes this call, and does its own policy allow it?
|
||||
- 2026-11-02 · foundations · warm-up: chose a gateway endpoint for Secrets Manager and an interface endpoint for S3, the types reversed (4th miss) → ask "Is it S3 or DynamoDB?": yes = gateway (route-table entry, free), no = interface (ENI, paid). Retest in the same session ✔.
|
||||
- 2026-11-02 · sdk · `sdk_2`: counted pages with `__sizeof__()`, then `len(page.values())` → one pass of the loop = one page. `PageSize` copied into `list_all_keys` adds API calls without changing the result.
|
||||
- 2026-11-02 · sdk · `sdk_3`: `rand(0, max)` (`rand()` takes no arguments, multiply), `ClientError["operation_name"]` (→ `except ClientError as err`, `err.response["Error"]["Code"]`), `raise _error(...)` from the test section, which replaces the real error (→ bare `raise` inside `except`). Decide "last attempt" before sleeping.
|
||||
- 2026-11-02 · sdk · `sdk_4`: guessed the credential keys `AccessKey`, `SecretKey`, `Token` → `AccessKeyId`, `SecretAccessKey`, `SessionToken`. Also forgot to return the client.
|
||||
- Pattern (2026-11-02): exercise misses are mostly Python and boto3 details, while exam-level reasoning is improving (sdk quiz 10/10; DeletionPolicy, LeadingKeys, PassRole, cross-account all ✔). The VPC endpoint type is the stubborn concept.
|
||||
- 2026-11-04 · kms · warm-up: chose `kms:CreateGrant` for a multipart upload to SSE-KMS that fails while small PUTs work → S3 decrypts the encrypted parts to complete the object, so multipart needs `kms:Decrypt` as well as `kms:GenerateDataKey`.
|
||||
- 2026-11-04 · s3 · `s3_1`: put the content type in `Metadata` three times → `ContentType` is its own parameter, `Metadata` holds `x-amz-meta-*` values. Also picked `create_bucket_metadata_configuration` and `get_bucket_metadata_configuration` (the S3 Metadata feature) instead of a plain `CreateBucketConfiguration` dict and `head_object`.
|
||||
- 2026-11-04 · s3 · `s3_2`: `ClientMethod="GET"` (→ `"get_object"`). Wrote an IAM-style policy (`s3:PutItem`, `StringEquals`) and `put_bucket_policy` for a presigned POST → boto3 builds and signs the POST policy from `Conditions`; `Fields` holds the values the form sends.
|
||||
- 2026-11-04 · s3 · `s3_3`: sliced with the part index instead of a byte offset, appended whole `upload_part` responses to `Parts` (→ only `PartNumber` and `ETag`), `use_threads=10` (→ `max_concurrency=10`). The submitted version keeps the `try` inside the loop, so a failed `complete_multipart_upload` is not aborted.
|
||||
- 2026-11-04 · s3 · `s3_4`: read `SSECustomerAlgorithm` (SSE-C) instead of `ServerSideEncryption`, sent `SSEKMSKeyId` without `ServerSideEncryption="aws:kms"`, IAM `StringEquals` in the default encryption config, `Rules` as a dict (→ a list).
|
||||
- 2026-11-04 · s3 · `s3_1` check question: chose `CreateBucketMetadataConfiguration` to change `x-amz-meta-owner` on one object → it sets up the S3 Metadata feature for a bucket. Metadata can't be edited in place: `CopyObject` onto the same key with `MetadataDirective` = `REPLACE`.
|
||||
- Pattern (2026-11-04): most `s3_1`–`s3_4` misses are boto3 names and shapes guessed from autocomplete, plus an IAM-policy habit where the API has its own format. Read the test and the book's sample before typing.
|
||||
- 2026-11-07 · kms · warm-up: chose `kms:ReEncryptFrom` for large SSE-KMS uploads failing while small ones work, then `GenerateDataKey` + `Encrypt` on the retest (3rd and 4th misses) → S3 never calls `kms:Encrypt` (it takes ≤ 4 KB of data). Envelope encryption: write = `GenerateDataKey`, read and multipart completion = `Decrypt`.
|
||||
- 2026-11-07 · cloudformation · warm-up: chose `UpdateReplacePolicy: Snapshot` for a final backup when the stack is deleted (same distractor as 29 Oct, 5th miss on the topic) → the attribute name says the trigger: deleted → `DeletionPolicy`, replaced by an update → `UpdateReplacePolicy`.
|
||||
- 2026-11-07 · iam · warm-up: chose `ec2:CreateNetworkInterface` in the function's resource-based policy, although the error names the execution role (3rd miss on the item) → resource-based policy = who may invoke (inbound); what Lambda calls (outbound) = execution role.
|
||||
- 2026-11-07 · s3 · `s3_5`: asked how to code "days > 30 → STANDARD_IA" → a lifecycle rule is declarative, S3 applies it by object age. Then `"Status": True` (→ `"Enabled"`), one dict per field (→ one rule = one dict), `Rules` as a dict again as in `s3_4` (→ a list), `raise NotImplementedError` left in.
|
||||
- 2026-11-07 · s3 · `s3_5` check question: chose suspending versioning to stop noncurrent versions piling up → suspension deletes nothing. `Expiration` in a versioned bucket only adds a delete marker; `NoncurrentVersionExpiration` deletes the old data.
|
||||
- 2026-11-08 · kms · warm-up: chose `kms:Decrypt` + `kms:CreateGrant` for a role doing SSE-KMS multipart uploads (5th miss). The two halves swap from one try to the next (7 Nov: `GenerateDataKey` + `Encrypt`) → multipart = write + read = `GenerateDataKey` + `Decrypt`. `CreateGrant` is for services that keep using a key (EBS, RDS).
|
||||
- 2026-11-09 · lambda · `lambda_1`: read the context as a dict with the test helpers' constructor names (`context["request_id"]`, `remaining_ms`, `start_ms`) → it is an object: `context.aws_request_id`, `context.function_name`, `context.get_remaining_time_in_millis()`. `event["name"]` (→ `.get("name") or "world"`). `.remove()` on the list being iterated, through an alias, skipped every other item → `enumerate` and return `items[i:]`. Passed on the 3rd check.
|
||||
- 2026-11-09 · lambda · `lambda_2`: assigned `_table` inside `get_table()` without `global` and dropped the `return`, so the handler read `None` → `global _table`, create it if `None`, always return it. Passed on the 2nd check.
|
||||
- 2026-11-09 · lambda · `lambda_3`: `json.dump` on the whole response (→ `json.dumps` on the body only), `status` (→ `statusCode`), headers at the top level (→ a `headers` dict), `"ALLOWED_ORIGIN"` in quotes, and a 400 for a request with no query string (→ 200 with everything; 400 only for an unknown status). Passed on the 2nd check.
|
||||
- 2026-11-10 · lambda · `lambda_4`: did not see what the exercise asked (batch vs one message per call) → explained with the test's 3-message batch: one bad message must not stop the loop; return only the failed `messageId`s in `batchItemFailures`. Passed on the 1st check after that, with a bare `except:` (→ `except Exception:`).
|
||||
- 2026-11-10 · lambda · `lambda_5`: `Attr` not imported, `time.time()` instead of the injected `now()` (and a float, refused by the boto3 resource), and `len(put_item(...)) > 0` to detect a duplicate → a failed condition RAISES `ConditionalCheckFailedException`. Passed on the 2nd check, but any other `ClientError` (throttling) falls through to `charge()`: re-raise with a bare `raise`.
|
||||
- 2026-11-10 · lambda · `lambda_6`: passed on the 1st check, but `round()` for the concurrency needed → Python rounds .5 to the even number (`round(6.5)` = 6), and capacity must round UP: `math.ceil`. `max_requests_per_second` also rounded (returns the float), and `MIN_UNRESERVED` unused (hard-coded 100).
|
||||
- 2026-11-10 · lambda · `lambda_7`: `EphemeralStorage=2048` (→ `{"Size": 2048}`), `Architectures="arm64"` (→ a list, same plural-name trap as `Rules` in `s3_4`/`s3_5`), and `MemorySize` forgotten. The async config (`put_function_event_invoke_config`: retries, max event age, `OnFailure` destination) was right the first time. Passed on the 2nd check.
|
||||
- 2026-11-10 · lambda · `lambda_8` (ch16, done early): pointed the alias's main version at the candidate for a canary, wrote `AdditionalVersionWeights` as a number, then listed BOTH versions (`{candidate: 0.1, stable: 0.9}`, refused by real AWS), then promoted through `start_canary` with `weight={}` → canary = main `stable` + `{candidate: 0.1}`; promote = main `candidate` + `{}`; rollback = main `stable` + `{}`. `promote` given after the 3rd hint. Passed on the 4th check.
|
||||
- 2026-11-10 · lambda · `lambda-005`: chose "Lambda holds the extra invocations for up to 6 hours" for SYNCHRONOUS calls over the 1,000 limit (200 rps × 4 s = 800 + 400) → the 6 h retry window is for async invocations; a synchronous caller gets 429 at once.
|
||||
- 2026-11-10 · kms · end quiz: chose `kms:Encrypt` + `kms:GenerateDataKey` for SSE-KMS multipart uploads (6th miss, same `Encrypt` as 7 Nov) → S3 never sends data to KMS (`Encrypt` ≤ 4 KB). Write = `GenerateDataKey`; multipart completion and reads = `Decrypt`.
|
||||
- 2026-11-10 · iam · end quiz: chose "the `LeadingKeys` condition applies only to the base table" for a query on a GSI → the policy covers `index/*`, and `LeadingKeys` is the partition key value of the index queried (`OVERDUE`), which ≠ the tenant tag → denied.
|
||||
|
||||
- 2026-11-16 · apigw · `apigw-008`: considered resource policy or IAM/SigV4 for valid Cognito user-pool tokens with no custom code → Cognito user pool authorizer.
|
||||
- 2026-11-16 · messaging · `messaging-004`: uncertain between long polling and delivery delay; first choice A counted correct → waiting for messages (`WaitTimeSeconds`) differs from delaying their availability (`DelaySeconds`).
|
||||
- 2026-11-16 · exercises · SQS attributes use string seconds; redrive needs the DLQ ARN in JSON; FIFO suffix check returns a boolean, and sends need a customer message group plus stable JSON for body deduplication. `sqs_1` passes but still has a bare `except:` that hides deletion errors; cleanup remains.
|
||||
- 2026-11-21 · streaming · `streaming-008`: chose Standard workflows for 50,000 short idempotent runs/s → Express (high volume, under 5 min, at-least-once).
|
||||
- 2026-11-21 · cognito · `cognito-014`: chose authorization code with a secret in secure storage for a mobile app that cannot keep a secret → a public client uses PKCE and no secret; a secret on a device can be extracted.
|
||||
- 2026-11-21 · cognito · `cognito-006`: chose read-only IAM user keys embedded in the app for guests → never ship long-term keys; identity pool guest (unauthenticated) role.
|
||||
- 2026-11-21 · kms · `kms-013`: chose a required encryption context to force use through DynamoDB → the role could send the same context directly; `kms:ViaService` limits the key to requests made by DynamoDB.
|
||||
- 2026-11-21 · secrets · `secrets-016`: chose caching the password to avoid rotation failures → after single user rotation the cached password is invalid; alternating users keeps the previous credentials valid.
|
||||
- 2026-11-21 · apigw · end quiz: chose a resource policy allowing the user pool ARN to validate Cognito tokens (2nd miss, same distractor as 16 Nov) → Cognito user pool authorizer; resource policies filter callers (accounts, IPs, VPCs), they never read a JWT.
|
||||
- 2026-11-21 · iam · end quiz: chose a resource-based policy on the Lambda function for cross-account S3 reads → that policy says who may invoke the function. Outbound = execution role identity policy, plus the bucket policy.
|
||||
- 2026-11-22 · sam · `sam-006`: chose "writes FAILED to CloudWatch Logs" for a PreTraffic hook → the hook must call `PutLifecycleEventHookExecutionStatus`; CodeDeploy never reads logs.
|
||||
- 2026-11-22 · sam · `sam-011`: chose S3 + one CodePipeline per branch for per-branch front-end deployments with PR previews → Amplify Hosting (LEAST effort = managed per-branch CI/CD).
|
||||
- 2026-11-24 · sam · original: chose S3 + one CodePipeline per branch again for per-branch SPA deploys with PR previews → Amplify Hosting. "Per-branch URL + PR previews + LEAST effort" = Amplify; any "one pipeline per branch" option is the operational-overhead distractor.
|
||||
- 2026-11-22 · exercises · `cfn_2`: `Condition:` takes a condition NAME (`IsProd`), not an `!Equals` expression; `!If` also takes the name; `!Join` = separator + YAML list. `cicd_2`: ECS blue/green has 8 events, including `Install`, `AllowTestTraffic`, `AllowTraffic` that cannot be hooked.
|
||||
- Pattern (2026-11-21): 6 of 7 misses are Domain 2, and 4 of them pick a mechanism that controls the wrong direction or the wrong layer (resource policy for a token, function policy for an outbound call, encryption context for the call path, caching for a server-side change). Ask: who makes this call, and which component actually checks it?
|
||||
- 2026-11-24 · containers · `containers-016`: chose rolling with additional batch for 15% of traffic with automatic rollback → traffic splitting.
|
||||
- 2026-11-24 · cloudformation · `cloudformation-018`: chose delete and recreate for `UPDATE_ROLLBACK_FAILED` → `continue-update-rollback --resources-to-skip`.
|
||||
- 2026-11-24 · testing · `testing-012`: chose `--parameter-overrides` for an environment variable that references a resource → `sam local invoke --env-vars env.json`.
|
||||
- 2026-11-24 · testing · `testing-006`: chose `sam local invoke --event` to generate a payload → `sam local generate-event`.
|
||||
- 2026-11-24 · lambda · original: chose "S3 drops the events after three attempts" for throttled S3 invocations → async: Lambda queues them and retries for up to 6 h.
|
||||
- 2026-11-24 · iam · `iam-017`: chose a permissions boundary for per-tenant temporary credentials → session policy passed to `AssumeRole`.
|
||||
- 2026-11-24 · containers · `containers-012`: chose EKS for "no clusters to configure" → App Runner.
|
||||
- 2026-11-26 · lambda · `lambda-004`: chose provisioned concurrency to protect a 50-connection DB → reserved concurrency caps executions; provisioned only pre-warms.
|
||||
- 2026-11-26 · lambda · `lambda-007`: chose an on-failure destination for one bad SQS message → partial batch response (`ReportBatchItemFailures`).
|
||||
- 2026-11-26 · lambda · `lambda-008`: chose an interface endpoint for a public third-party API → NAT gateway.
|
||||
- 2026-11-26 · patterns · `cicd-011`, `cloudformation-013`, `lambda-019`, `cicd-001`, `cicd-008`: chose a log metric filter, a custom resource, CloudFront, a pipeline variable, a sleeping CodeBuild action → the built-in feature (EventBridge rule, SSM public parameter, function URL, `env.secrets-manager`, manual approval).
|
||||
- 2026-11-26 · kms · `kms-006`: chose an AWS managed key → it cannot be disabled and its policy is fixed: customer managed key.
|
||||
- 2026-11-27 · mock #2 · misread the deciding keyword: `sam-008` ReadPolicy for "read and write", `dynamodb-006` GSI for strong reads, `cloudformation-003` StackSet for independent stacks, `messaging-010` Firehose for event routing + replay, `optimization-005` public subnets instead of gateway endpoints, `lambda-011` zip through S3 for 1.8 GB.
|
||||
- 2026-11-27 · mock #2 · built-in features not known: Access Analyzer policy generation (chose Inspector), CodeArtifact (ECR), Distributed Map (Parallel), SnapStart (provisioned), CreationPolicy + `cfn-signal` (`DependsOn`), `sam build --use-container` (arm64), `NEW_AND_OLD_IMAGES` (KEYS_ONLY), replication storage class.
|
||||
- 2026-11-27 · mock #2 · wrong direction again: VPC endpoint for CodeBuild to reach RDS (→ build project VPC config); Organizations invite for a SaaS vendor (→ role + external ID); group roles via a 2nd identity pool (→ role mapping).
|
||||
- 2026-11-26 · patterns · re-check Q2 (learner): "LEAST => built-in AWS product, and the only answer with an AWS product was the CodePipeline variable" → the rule is a feature of the service in the question, fewest moving parts. `env.parameter-store` is CodeBuild's built-in feature even though it reads as a config key. Test: drop options that break a requirement, then count what must be built or run.
|
||||
- 2026-11-28 · official set · Q2: chose ALB sticky sessions for sessions across devices (2nd time, see 27 Oct) → ElastiCache (Redis OSS) session store.
|
||||
- 2026-11-28 · official set · Q5: misread, not a knowledge gap (learner: "I knew taskFailed was wrong but didn't read it enough"). B and D shared `HeartbeatSeconds`, only the second half differed. Not queued.
|
||||
- 2026-11-28 · official set · Q6: alias per version, alias → alias → event source mappings use the alias ARN; the alias is moved to each new version.
|
||||
- 2026-11-28 · official set · Q10: asymmetric KMS key with the Database Encryption SDK → symmetric KMS key.
|
||||
- 2026-11-28 · official set · Q11: CloudWatch first, then X-Ray (confident) → X-Ray finds the slow service in the graph, CloudWatch examines it.
|
||||
- 2026-11-28 · official set · Q17: `appspec.yml` "in the same S3 bucket as the bundle" → at the root of the application source (inside the revision).
|
||||
- 2026-11-28 · official set · Q19: Parameter Store + connection inside the handler → connection opened outside the handler (`lambda_2` practised this).
|
||||
- Pattern (2026-11-28): 3 of 7 misses are older lessons (sticky sessions 27 Oct, init outside the handler `lambda_2`, ESM → alias). Pace was fine (1 min 32 s), so the misses are recall, not speed. Q5 and Q11 are misreads of the same kind: two options with the same first half, decided by the second half.
|
||||
- 2026-11-29 · end quiz · three "X or Y" answers, each with the right letter in the pair: session policy vs permissions boundary (`iam`), alias vs `$LATEST` (`sam-010`), grant vs multi-Region replica key (`kms-014`). Counted wrong: the exam takes one letter.
|
||||
- 2026-11-29 · end quiz · `containers-003`: chose the task role "because the execution role looked like bait" → secrets injected at task start are fetched by the task execution role.
|
||||
- 2026-11-29 · drill · rules known, numbers not: SQS visibility "15 min" (that is the delay max), retention "15 days", DynamoDB item "1 MB" (that is the Query page), API Gateway timeout "15 min, 502/503", Express "milliseconds", logs "14 days".
|
||||
|
||||
## Session log
|
||||
|
||||
| Date | What we did | Result |
|
||||
|---|---|---|
|
||||
| 2026-10-21 | Repository created | — |
|
||||
| 2026-10-27 | Branch `to` created. Plan redone: D1 = Tue 27 Oct … D35 = Mon 30 Nov (exam, 14:00). Nothing studied yet | D1 starts today |
|
||||
| 2026-10-27 | D1: `uv` installed, `intro_1` and `intro_2` done, diagnostic quiz of 20 questions (all topics). ch00 reading not confirmed yet | 14/20 (70%); D1 2/5, D2 4/5, D3 2/3, D4 6/7; 6 misses in the mistake log, 5 topics queued for 2026-10-28 |
|
||||
| 2026-10-27 | D1 closed: ch00 read, exam booking confirmed with ESL +30 (160 min) | D1 complete. ch00 confidence 4/5 |
|
||||
| 2026-10-28 | D2: ch01 read. Warm-up on the 5 queued topics (other session), then foundations quiz in chat (7 bank + 3 original) | Warm-up 4/5 (CloudFormation missed again). Quiz 6/10: missed EFS vs EBS, SG→SG reference, interface vs gateway endpoint, execution role vs caller. 4 new review items for 2026-10-29 |
|
||||
| 2026-10-29 | D3: warm-up on 5 due items, asked with the native question UI (learner's request, now in CLAUDE.md) | 2/5: SG→SG and EFS ✔; CloudFormation DeletionPolicy, SQS interface endpoint, execution role ✘ again → back for 2026-10-30 |
|
||||
| 2026-10-29/30 | D3 (evening): ch02 reading started (STS, the DynamoDB `LeadingKeys` policy, GSI explained). `iam_2` and `iam_3` done with hints. `boto3-stubs` added for VS Code autocompletion | 1 in-chat question ✘ (LeadingKeys on a GSI). Behind by about half a day: finish D3 (iam_4–5, iam quiz) and start D4 ch03 on 30 Oct |
|
||||
| 2026-10-31 | D5 slot, catching up D3/D4 (nothing studied on 30 Oct). Warm-up on 5 due items (DeletionPolicy, SQS endpoint, execution role, LeadingKeys, RDS Proxy). DynamoDB on-demand, fan-out and IMDSv2 postponed to 1 Nov | 2/5: execution role and RDS Proxy ✔; DeletionPolicy (4th miss), SQS gateway endpoint (3rd), LeadingKeys (2nd) ✘ → back on 2026-11-01 |
|
||||
| 2026-10-31 (evening) | `iam_4` done with hints (Deny conditions, Principal types, boto3 keyword args). `iam_5` done: the test was stricter than IAM, relaxed after checking the AWS docs (PR #19). Exercises typed with boto3-stubs (PR #18). iam quiz in chat (7 bank + 3 original) | iam_4 check question ✘ (KMS Decrypt). iam quiz 6/10: PassRole, SCP/cross-account, get-caller-identity, `:root` principal ✘. 4 new review items. ch03 moved to 1 Nov |
|
||||
| 2026-11-01 (00:20) | D4 started: ch03 reading, `sdk_1` (credential chain) done in 5 checks. The chain order was right from the first try; the misses were Python details (`dict[k]` vs `.get`, list vs tuple) and chain rules (env vars ignored unless key + secret, `AWS_PROFILE` picks the profile, a missing profile falls through to the next source) | sdk_1 ✔ |
|
||||
| 2026-11-02 | D7 slot, finishing D4. Warm-up on 5 due items plus an endpoint retest, rest of ch03, `sdk_2`–`sdk_5` with hints, sdk quiz in chat (7 bank + 3 original). `/today` first planned from a stale checkout (3 days behind origin), corrected after the learner flagged it | Warm-up 4/5: DeletionPolicy (first ✔ after 4 misses), LeadingKeys, PassRole, cross-account ✔; endpoints ✘ (4th), retest ✔. sdk quiz 10/10. 12/83 exercises. lab00 next |
|
||||
| 2026-11-02 (later) | lab00: AWS CLI v2 installed, root protected, budget created, admin user and `dva-lab` profile set up (option B). Exports added to `~/.bashrc`, direnv not used | lab00 done, safety settings confirmed with read-only CLI calls. Next: Tue 3 Nov, ch04 part 1 + s3_1–4, 8 review items due |
|
||||
| 2026-11-04 | D9 slot, starting D5 (nothing logged on 3 Nov). Warm-up on 5 of the 8 overdue items. Security group references, EFS and the execution role moved to 5 Nov | 4/5: VPC endpoints (first try), DynamoDB on-demand, fan-out, IMDSv2 ✔; SSE-KMS multipart ✘. On-demand, fan-out and IMDSv2 removed from the queue after two successful reviews |
|
||||
| 2026-11-04 (evening) | ch04 read in full (so D6 reading is done too). `s3_1`–`s3_4` done with hints, several rounds each | 16/83. S3 metadata and presigned POST added to the queue for 5 Nov. Check questions next |
|
||||
| 2026-11-04 (evening, later) | Check block: `s3_1` question and the 5 ch04 "Check yourself" questions. Learner: the exercises were "impossible to do without asking for help". Confirmed: the book never names the low-level multipart calls, `max_concurrency` or `put_bucket_encryption`. From `s3_5`, the tutor briefs the calls and formats the book omits, and hints start at level 2 | 5/6: direct uploads, forcing SSE-KMS, presigned URL expiry, CORS, storage class ✔; metadata update ✘. D5 closed. Next: Thu 5 Nov, `s3_5`–`s3_7`, s3 quiz, start ch05, 10 review items due |
|
||||
| 2026-11-07 | D9 slot, nothing logged 5–6 Nov (2 days behind). Catch-up planned: D6 + D8 today, D9 + D10 on Sun 8. Warm-up on 5 of the 12 due items, KMS retest in the same session. 7 items postponed to 8 Nov | 2/5: S3 metadata `REPLACE` and SG → SG ✔ (SG → SG out of the queue); SSE-KMS multipart, DeletionPolicy, execution role ✘, KMS retest ✘ → back on 8 Nov |
|
||||
| 2026-11-08 | D9 + D10 slot (D6 quiz and D8 still open; `s3_6`, `s3_7` done on 7 Nov after the last update). Warm-up on 5 of the 11 due items, as classic MCQs (learner's request: no free-recall prompt). 6 items postponed to 9 Nov | 4/5: DeletionPolicy, execution role (first ✔ after 3 misses), noncurrent versions, RDS Proxy ✔ (caching out of the queue); SSE-KMS multipart ✘ (5th) → back on 9 Nov |
|
||||
| 2026-11-10 | D13 + D14 slot, catching up D6, D8, D9. ch05 read. `lambda_4` (after re-explaining the batch), `lambda_5` (2nd check, missing re-`raise` noted), `lambda_6` (`round` vs `ceil`), `lambda_7` (2nd check), `lambda_8` (D23, done early, 4th check, `promote` given). End quiz in chat: 3 s3 + 3 lambda (bank) + 4 weak spots (original) | 27/83. Quiz 7/10: s3 3/3, VPC endpoints and PassRole ✔ (both out of the queue); `lambda-005` sync throttling, SSE-KMS multipart (6th), `LeadingKeys` on a GSI ✘ → back on 11 Nov. Still 4 plan days behind, spare days used up |
|
||||
| 2026-11-14 | D19 slot. Synced (checkout 9 commits behind). ch06 confirmed read, `apigw_1`–`apigw_3` done on 12 Nov. Plan for today written in the Snapshot (ch07 + ch08, `ddb_1`–`ddb_9`, `cache_1`–`cache_3`, end quiz with 4 weak spots; the other 6 due items moved to 15 Nov). Repo adapted so Codex can be the tutor too: `AGENTS.md` holds the instructions (`CLAUDE.md` imports it), `.agents/skills` links to `.claude/skills` | 30/83. Session in progress: ch07 reading next |
|
||||
| 2026-11-16 | Finished DynamoDB (9), caching (3) and messaging (6) exercises; 50 tests passed across all 18 files. Combined end quiz: 4 messaging, 1 DynamoDB, 2 caching, 1 API Gateway, 4 weak spots. All 12 answers logged, with uncertainty preserved. | 48/83 exercises; quiz 11/12 (3A tentative; 8B/A wrong). Overall 70% on 119 answers. Four weak spots correct; DeletionPolicy retired after second successful review. Next Tue 17 Nov: ch10 + kinesis_1–3 / sfn_1–2; one end quiz. Learner stopped for the day. |
|
||||
| 2026-11-21 | Learner: read up to ch12, wants to skip days. Catch-up plan agreed: labs and most remaining exercises dropped, ch18–23 tips only, mock #1 moved up to Tue 24, Wed 25 buffer. ch13 + ch14 read, `kms_2` done (first check). End quiz: 9 bank (streaming, patterns, cognito, kms, secrets) + 3 weak spots (original) | 49/83. Quiz 5/12: Domain 2 2/8. SQS long polling ✔ (2nd success); Cognito authorizer ✘ (2nd), cross-account ✘. 5 new review items for 22 Nov. 9 days to the exam |
|
||||
| 2026-11-22 | Catch-up day 2. ch15 read, `cfn_2` done (3 checks: `!Join` syntax, condition referenced by name). ch16 skipped, summarized in chat. ch17 read, `cicd_2` done (3 checks: typo, ECS non-hookable events). `sam_1` skipped. End quiz: 8 bank (cloudformation, sam, cicd) + 4 weak spots (original) | 51/83 (after removing `cfn_2`'s marker). Quiz 10/12: Domain 2 5/5, all four 21 Nov misses ✔; both SAM questions ✘ (PreTraffic hook, Amplify). 143 answers, 69%. Next: Mon 23 ch18–23 tips + quiz, mock #1 Tue 24. 8 days to the exam |
|
||||
| 2026-11-23 | Short session, then the learner read ch20 + ch21 in full and asked for the quiz (answered after midnight, logged 24 Nov). End quiz: 7 bank (monitoring, xray) + 4 weak spots (original). ch18, ch19, ch22, ch23 moved to Wed 25 | 50/83 in `stats` (51 with `cfn_2`). Quiz 10/11: Domain 4 7/7; alternating users, Express, PreTraffic hook ✔; Amplify ✘ (2nd). 154 answers, 70%. Next: Tue 24 mock #1. 6 days to the exam |
|
||||
| 2026-11-24 | D29 slot, opened at 21:05: mock #1 not taken. Learner asked for more practice: 20-question quiz (14 bank + 6 original) on containers, testing, troubleshooting and weak spots, no reserve questions | Quiz 13/20: D4 4/4, D2 5/6, D3 3/8. SSE-KMS multipart, Amplify, `LeadingKeys`, PKCE, cross-account ✔. 174 answers, 70%. New schedule proposed, not yet agreed. 6 days to the exam |
|
||||
| 2026-11-26 | Day off. ch18 + ch19 read, ch22–23 tables. Quick quiz 9/9. Mock #1 at 14:00, Ctrl+C at Q56: answers recovered from the terminal export. CLI fixed (Ctrl+C asks before ending, saves); `validate` fixed (finished exercises, 3 reformatted test sections restored). RCU math taught (1/3, then 2/2). Debrief: 15 misses grouped, re-check 2/4. Evening: "LEAST effort" test clarified (learner's reasoning logged), Parameter Store vs Secrets Manager in CodeBuild, AMI/SSM and the SSM AMI parameter (1/1), VPC ways out (3/3), X-Ray reservoir (1/1). Book review of the misses done (learner). Calendar for Fri 27 moved around the 10:00 call and 2 h of sport. CLI fix sent to `main` as PR #21 | Mock #1 73% (41/56; 70% without RCU guesses). D3 69%, D4 67%. Still wrong on re-check: reserved vs provisioned, pipeline variable for secrets. Next: Fri 27 official practice set + mock #2. 4 days to the exam |
|
||||
| 2026-11-27 | D32. Morning lost (learner busy): ch25 traps only, official practice set not done. Mini recap of mock #1 misses, mock #2 at about 14:45, debrief, re-check, refresh asked by the learner on LSI/GSI, nested vs exports, Firehose, gateway endpoints, Distributed Map, SnapStart, `cfn-signal`, S3 replication | Mock #2 71% (46/65, all unseen), D4 55%, 65 min. Re-check 4/4. 7 review items for 28 Nov. Next: Sat 28 official set + mock #3. 3 days to the exam |
|
||||
| 2026-11-28 | D33. Official Practice Question Set on Skill Builder (20 questions, 30 min 45 s). 7 misses added to the queue for 29 Nov. Mock #3 next (65 unseen questions) | Official set 65% (13/20). 2 days to the exam. Session in progress |
|
||||
| 2026-11-29 | D34 light day. Mock #3 dropped. ch26 "Exam day" + "30 facts" read, with the learner's own 10 extra facts from past misses. Numbers drill (15 prompts). End quiz of 20 (14 unseen bank + 6 original) on weak spots and D3/D4 | Drill 8/19. Quiz 16/20 (80%): sticky sessions, appspec, X-Ray first, symmetric key, connection outside the handler, `UPDATE_ROLLBACK_FAILED`, blue/green, SAM CLI ✔; session policy, alias, KMS grant, ECS execution role ✘. 3 review items removed. 361 answers, 71%. Exam tomorrow 14:00 |
|
||||
| 2026-11-30 | D35 exam day. Morning drill at 10:15: 10 numbers + 5 one-liners from the weak spots due today | Drill 12/15: session policy, X-Ray sampling, ECS execution role, alias ARN ✔ (all ✘ on 29 Nov); KMS grant ✘ (2nd), traffic splitting ✘, async 6 h ✘. Then, at the learner's request, quiz 7/8 (5 bank missed before + 3 original; `cicd-001` ✘ 3rd time) and a 2nd drill 5/10. 394 answers. Exam at 14:00 |
|
||||
@@ -14,7 +14,7 @@ one small exercise at a time. A Claude Code or Codex tutor keeps track of your p
|
||||
| ❓ **Question bank** | `quizzes/bank/` | 408 original exam-style questions with explanations, 23 topics, and timed **65-question mock exams** (the first two made of questions kept out of quizzes) |
|
||||
| 🧪 **Labs** | `labs/` | 7 optional labs on a real AWS account (SAM canary, Cognito, Step Functions, CI/CD, X-Ray, Beanstalk), with costs and teardown |
|
||||
| 🧑🏫 **Tutor** | `AGENTS.md`, `.claude/skills/` | A Claude Code or Codex coach: plans your day, quizzes you, explains, drills numbers, and updates `PROGRESS.md` |
|
||||
| 🗓️ **Plan** | `STUDY_PLAN.md`, `EXAM_GUIDE.md` | 35 days, about 1–1.5 h per day, from 27 Oct to the exam (30 Nov), plus exam facts and the domain → content map |
|
||||
| 🗓️ **Plan** | `STUDY_PLAN.md`, `EXAM_GUIDE.md` | 35 days, about 1–1.5 h per day, from 22 Oct to the exam, plus exam facts and the domain → content map |
|
||||
|
||||
## Quick start
|
||||
|
||||
|
||||
+39
-100
@@ -1,29 +1,9 @@
|
||||
# Study plan — DVA-C02 in 5 weeks
|
||||
|
||||
**Start:** Tuesday 27 Oct 2026 · **Exam:** Monday 30 Nov 2026 at **14:00**, which is also the
|
||||
last day of DVA-C02 (34 study days, then exam day)
|
||||
**Start:** Thursday 22 Oct 2026 · **Suggested exam:** Wednesday 25 Nov 2026 ·
|
||||
**Hard deadline:** Monday 30 Nov 2026 (last day of DVA-C02)
|
||||
**Rhythm:** about 1–1.5 h per day. Each "review" day absorbs delays.
|
||||
|
||||
> **No spare day.** The exam is on the last day DVA-C02 can be taken, so a missed or postponed sitting
|
||||
> means DVA-C03 (from 1 Dec). Keep the three review days (D7, D14, D21) free to catch up. If you are
|
||||
> more than 2 days behind at D21, drop the optional labs first, then shorten the reading (the chapter
|
||||
> "In this chapter" box, the Exam tips and Traps, then the quiz), and never skip mocks #1 and #2.
|
||||
|
||||
## Catch-up plan from Sat 21 Nov (agreed 2026-11-21)
|
||||
|
||||
ch00–ch12 read, 48/83 exercises, about 5 plan days behind. Optional labs dropped. Remaining exercises
|
||||
reduced to `kms_2`, `cfn_2`, `sam_1`, `cicd_2`. From ch18, read only the "In this chapter" box, Exam tips
|
||||
and Traps, then the quiz. Mock #1 moved up to Tue 24 so Wed 25 is a buffer. This table replaces D26–D30.
|
||||
The days off (Thu 26, Fri 27) and the rest of week 5 stay as below.
|
||||
|
||||
| Date | Work |
|
||||
|---|---|
|
||||
| Sat 21 Nov (double) | ch13 KMS + ch14 Secrets · `kms_2` · end quiz (incl. streaming, patterns, cognito) |
|
||||
| Sun 22 Nov (double) | ch15 CloudFormation + ch16 SAM + ch17 CI/CD · `cfn_2`, `sam_1`, `cicd_2` · end quiz |
|
||||
| Mon 23 Nov | ch18–ch23, Exam tips and Traps only · end quiz |
|
||||
| Tue 24 Nov | **Mock exam #1** (160 min, one sitting, no notes) |
|
||||
| Wed 25 Nov | Buffer: review mock #1 with `/mock-exam` · deep dive on the 3 weakest topics · ch24 numbers |
|
||||
|
||||
Each day follows the same loop:
|
||||
|
||||
1. **Read** the chapter (`book/src/…`, or `mdbook serve book`), 30–45 min.
|
||||
@@ -37,25 +17,25 @@ Each day follows the same loop:
|
||||
|
||||
| Day | Date | Read | Exercises | Quiz |
|
||||
|---|---|---|---|---|
|
||||
| D1 | Tue 27 Oct | Introduction, ch00 exam strategy. **Confirm your exam booking** for Mon 30 Nov, 14:00 (ESL +30: request it first if English is not your native language; if you already booked without it, check in your AWS Certification account whether it can still be added) | intro_1–2 | `quiz -n 20` (diagnostic, all topics) |
|
||||
| D2 | Wed 28 Oct | ch01 AWS foundations for developers | — | foundations |
|
||||
| D3 | Thu 29 Oct | ch02 IAM | iam_1–5 | iam |
|
||||
| D4 | Fri 30 Oct | ch03 CLI, SDKs, STS | sdk_1–5 | sdk |
|
||||
| D5 | Sat 31 Oct | ch04 S3 (buckets → encryption) | s3_1–4 | — |
|
||||
| D6 | Sun 1 Nov | ch04 S3 (lifecycle → events) | s3_5–7 | s3 |
|
||||
| D7 | Mon 2 Nov | **Review**: catch up, `/drill` week 1 numbers | — | `quiz --wrong` |
|
||||
| D1 | Thu 22 Oct | Introduction, ch00 exam strategy. **Book the exam** (and request ESL +30 first if English is not your native language) | intro_1–2 | `quiz -n 20` (diagnostic, all topics) |
|
||||
| D2 | Fri 23 Oct | ch01 AWS foundations for developers | — | foundations |
|
||||
| D3 | Sat 24 Oct | ch02 IAM | iam_1–5 | iam |
|
||||
| D4 | Sun 25 Oct | ch03 CLI, SDKs, STS | sdk_1–5 | sdk |
|
||||
| D5 | Mon 26 Oct | ch04 S3 (buckets → encryption) | s3_1–4 | — |
|
||||
| D6 | Tue 27 Oct | ch04 S3 (lifecycle → events) | s3_5–7 | s3 |
|
||||
| D7 | Wed 28 Oct | **Review**: catch up, `/drill` week 1 numbers | — | `quiz --wrong` |
|
||||
|
||||
## Week 2 — Lambda, API Gateway, DynamoDB, caching
|
||||
|
||||
| Day | Date | Read | Exercises | Quiz |
|
||||
|---|---|---|---|---|
|
||||
| D8 | Tue 3 Nov | ch05 Lambda (model, configuration, concurrency) | lambda_1–4 | — |
|
||||
| D9 | Wed 4 Nov | ch05 Lambda (event sources, async, VPC) | lambda_5–7 | lambda |
|
||||
| D10 | Thu 5 Nov | ch06 API Gateway & AppSync | apigw_1–3 | apigw |
|
||||
| D11 | Fri 6 Nov | ch07 DynamoDB (model, capacity, queries, indexes) | ddb_1–4 | — |
|
||||
| D12 | Sat 7 Nov | ch07 DynamoDB (conditions, transactions, streams, DAX) | ddb_5–9 | dynamodb |
|
||||
| D13 | Sun 8 Nov | ch08 Caching, relational databases, CloudFront | cache_1–3 | caching |
|
||||
| D14 | Mon 9 Nov | **Review**: Domain 1 so far | — | `quiz -d 1 -n 30` |
|
||||
| D8 | Thu 29 Oct | ch05 Lambda (model, configuration, concurrency) | lambda_1–4 | — |
|
||||
| D9 | Fri 30 Oct | ch05 Lambda (event sources, async, VPC) | lambda_5–7 | lambda |
|
||||
| D10 | Sat 31 Oct | ch06 API Gateway & AppSync | apigw_1–3 | apigw |
|
||||
| D11 | Sun 1 Nov | ch07 DynamoDB (model, capacity, queries, indexes) | ddb_1–4 | — |
|
||||
| D12 | Mon 2 Nov | ch07 DynamoDB (conditions, transactions, streams, DAX) | ddb_5–9 | dynamodb |
|
||||
| D13 | Tue 3 Nov | ch08 Caching, relational databases, CloudFront | cache_1–3 | caching |
|
||||
| D14 | Wed 4 Nov | **Review**: Domain 1 so far | — | `quiz -d 1 -n 30` |
|
||||
|
||||
Optional lab this week: **lab01 serverless API** (weekend).
|
||||
|
||||
@@ -63,13 +43,13 @@ Optional lab this week: **lab01 serverless API** (weekend).
|
||||
|
||||
| Day | Date | Read | Exercises | Quiz |
|
||||
|---|---|---|---|---|
|
||||
| D15 | Tue 10 Nov | ch09 SQS, SNS, EventBridge | sqs_1–4, sns_1, events_1 | messaging |
|
||||
| D16 | Wed 11 Nov | ch10 Kinesis, Firehose, Step Functions | kinesis_1–3, sfn_1–2 | streaming |
|
||||
| D17 | Thu 12 Nov | ch11 Application patterns and resilience | res_1–2 | patterns |
|
||||
| D18 | Fri 13 Nov | ch12 Cognito | cognito_1–3 | cognito |
|
||||
| D19 | Sat 14 Nov | ch13 KMS and encryption | kms_1–3 | kms |
|
||||
| D20 | Sun 15 Nov | ch14 Secrets and configuration | secrets_1–4 | secrets |
|
||||
| D21 | Mon 16 Nov | **Review**: Domain 2 | — | `quiz -d 2 -n 30` then `quiz --wrong` |
|
||||
| D15 | Thu 5 Nov | ch09 SQS, SNS, EventBridge | sqs_1–4, sns_1, events_1 | messaging |
|
||||
| D16 | Fri 6 Nov | ch10 Kinesis, Firehose, Step Functions | kinesis_1–3, sfn_1–2 | streaming |
|
||||
| D17 | Sat 7 Nov | ch11 Application patterns and resilience | res_1–2 | patterns |
|
||||
| D18 | Sun 8 Nov | ch12 Cognito | cognito_1–3 | cognito |
|
||||
| D19 | Mon 9 Nov | ch13 KMS and encryption | kms_1–3 | kms |
|
||||
| D20 | Tue 10 Nov | ch14 Secrets and configuration | secrets_1–4 | secrets |
|
||||
| D21 | Wed 11 Nov | **Review**: Domain 2 | — | `quiz -d 2 -n 30` then `quiz --wrong` |
|
||||
|
||||
Optional labs this week: **lab02 Cognito-protected API**, **lab03 event-driven pipeline**.
|
||||
|
||||
@@ -77,13 +57,13 @@ Optional labs this week: **lab02 Cognito-protected API**, **lab03 event-driven p
|
||||
|
||||
| Day | Date | Read | Exercises | Quiz |
|
||||
|---|---|---|---|---|
|
||||
| D22 | Tue 17 Nov | ch15 CloudFormation and CDK | cfn_1–2 | cloudformation |
|
||||
| D23 | Wed 18 Nov | ch16 SAM and serverless deployments | sam_1, lambda_8 | sam |
|
||||
| D24 | Thu 19 Nov | ch17 CI/CD with CodeCommit/CodeBuild/CodeDeploy/CodePipeline | cicd_1, cicd_2, cicd_4 | cicd |
|
||||
| D25 | Fri 20 Nov | ch18 Elastic Beanstalk and containers | cicd_3, ecs_1, beanstalk_1 | containers |
|
||||
| D26 | Sat 21 Nov | ch19 Testing · ch20 Monitoring and logging | sam_2, cw_1–5 | testing, monitoring |
|
||||
| D27 | Sun 22 Nov | ch21 Tracing · ch22 Troubleshooting | xray_1 | xray, troubleshooting |
|
||||
| D28 | Mon 23 Nov | ch23 Optimization. Run `awslings verify` | opt_1–2 | optimization |
|
||||
| D22 | Thu 12 Nov | ch15 CloudFormation and CDK | cfn_1–2 | cloudformation |
|
||||
| D23 | Fri 13 Nov | ch16 SAM and serverless deployments | sam_1, lambda_8 | sam |
|
||||
| D24 | Sat 14 Nov | ch17 CI/CD with CodeCommit/CodeBuild/CodeDeploy/CodePipeline | cicd_1, cicd_2, cicd_4 | cicd |
|
||||
| D25 | Sun 15 Nov | ch18 Elastic Beanstalk and containers | cicd_3, ecs_1, beanstalk_1 | containers |
|
||||
| D26 | Mon 16 Nov | ch19 Testing · ch20 Monitoring and logging | sam_2, cw_1–5 | testing, monitoring |
|
||||
| D27 | Tue 17 Nov | ch21 Tracing · ch22 Troubleshooting | xray_1 | xray, troubleshooting |
|
||||
| D28 | Wed 18 Nov | ch23 Optimization. Run `awslings verify` | opt_1–2 | optimization |
|
||||
|
||||
Optional labs this week: **lab04 CI/CD pipeline**, **lab05 observability**, **lab06 Beanstalk deployments**.
|
||||
|
||||
@@ -91,15 +71,13 @@ Optional labs this week: **lab04 CI/CD pipeline**, **lab05 observability**, **la
|
||||
|
||||
| Day | Date | Activity |
|
||||
|---|---|---|
|
||||
| D29 | Tue 24 Nov | **Mock exam #1** (`awslings mock`, 130 min, no notes, in one sitting), then review every miss with `/mock-exam` |
|
||||
| D30 | Wed 25 Nov | Deep dive on the 3 weakest topics (tutor-led) · ch24 numbers and limits |
|
||||
| D31 | Thu 26 Nov | **Full day off work.** **Mock exam #2** + review (timetable below) |
|
||||
| D32 | Fri 27 Nov | **Full day off work** (timetable below). ch25 service selection · **AWS official practice question set** (free on AWS Skill Builder, 20 questions written by AWS: timed, no notes), then give the score to your tutor (`/progress`) · targeted quizzes on weak topics |
|
||||
| D33 | Sat 28 Nov | **Mock exam #3** (or 3 domain mini-mocks, or the **AWS Official Practice Exam** if you have a Skill Builder subscription) · ch26 final checklist |
|
||||
| D34 | Sun 29 Nov | Light day: cheat sheets, `/drill`, sleep early. Last chance to cancel or reschedule if you decided not to sit (check the deadline in your booking confirmation) |
|
||||
| D35 | Mon 30 Nov | 🎯 **Exam day, 14:00, off work** (timetable below). Morning: 20 min of `/drill` numbers at most, no new topic, no mock. Check the ID and check-in requirements in your booking confirmation the day before |
|
||||
|
||||
Start mocks #1–#3 at **14:00**, your exam slot, so your focus and your lunch timing are already tuned.
|
||||
| D29 | Thu 19 Nov | **Mock exam #1** (`awslings mock`, 130 min, no notes, in one sitting), then review every miss with `/mock-exam` |
|
||||
| D30 | Fri 20 Nov | Deep dive on the 3 weakest topics (tutor-led) · ch24 numbers and limits |
|
||||
| D31 | Sat 21 Nov | **Mock exam #2** + review |
|
||||
| D32 | Sun 22 Nov | ch25 service selection · **AWS official practice question set** (free on AWS Skill Builder, 20 questions written by AWS: timed, no notes), then give the score to your tutor (`/progress`) · targeted quizzes on weak topics |
|
||||
| D33 | Mon 23 Nov | **Mock exam #3** (or 3 domain mini-mocks, or the **AWS Official Practice Exam** if you have a Skill Builder subscription) · ch26 final checklist |
|
||||
| D34 | Tue 24 Nov | Light day: cheat sheets, `/drill`, sleep early |
|
||||
| D35 | Wed 25 Nov | 🎯 **Exam day** (buffer until Mon 30 Nov) |
|
||||
|
||||
**Why the official practice questions?** Mocks #1 and #2 are made of questions the daily quizzes never
|
||||
showed you (the mock-only reserve of the question bank). Mock #3 reuses many questions you have already
|
||||
@@ -115,43 +93,6 @@ by another author: they are a calibration point that does not depend on this rep
|
||||
- Check the names and the subscription price on Skill Builder before you rely on them: AWS changes its
|
||||
catalog, and DVA-C02 material will be retired after 30 Nov 2026.
|
||||
|
||||
## Full days off work
|
||||
|
||||
Work gave 3 full days (learner, 2 Nov): two study days plus exam day. The dates are Thu 26 and
|
||||
Fri 27 Nov, confirmed on 2 Nov and in Google Calendar. With the weekend, they give four days in a row before the exam.
|
||||
|
||||
**Thu 26 Nov (D31)**
|
||||
|
||||
| Time | Work |
|
||||
|---|---|
|
||||
| 09:00–09:30 | Review items due in PROGRESS.md |
|
||||
| 09:30–12:00 | Next weakest topics from mock #1, after the 3 covered on Wed: `/explain`, then `uv run awslings quiz <topics> -n 20` |
|
||||
| 14:00–16:10 | **Mock exam #2**, in one sitting, no notes |
|
||||
| 16:30–18:30 | Review every miss with `/mock-exam` and update the review queue |
|
||||
|
||||
**Fri 27 Nov (D32)** (re-planned 26 Nov: 10:00 call, mock #1 taken on Thu 26)
|
||||
|
||||
| Time | Work |
|
||||
|---|---|
|
||||
| 09:00–10:00 | ch25 service selection |
|
||||
| 10:00–11:00 | (call, not study) |
|
||||
| 11:15–12:15 | **AWS official practice question set**, timed, no notes. Give the score to your tutor (`/progress`) |
|
||||
| 12:15–14:15 | Lunch and sport |
|
||||
| 14:30–16:40 | **Mock exam #2**, one sitting, no notes, flag guesses with `f` |
|
||||
| 17:00–17:30 | Review the official practice misses |
|
||||
| 17:30–18:30 | Debrief with `/mock-exam` (`/drill` moves to Sat/Sun) |
|
||||
|
||||
**Mon 30 Nov (D35)**
|
||||
|
||||
| Time | Work |
|
||||
|---|---|
|
||||
| Morning | `/drill`, 20 min at most. No new topic, no mock |
|
||||
| Late morning | ID and check-in as your booking confirmation says, then lunch at the time you rehearsed |
|
||||
| 14:00–16:40 | **Exam**: 160 min with ESL +30 |
|
||||
|
||||
If you are still more than 2 days behind at D21 (Mon 16 Nov) and work allows it, ask to move one study
|
||||
day to that week. Keep both mocks in the plan either way.
|
||||
|
||||
## Am I ready?
|
||||
|
||||
Go to the exam when **all** of these are true:
|
||||
@@ -166,7 +107,5 @@ extra threshold. If it is well below your recent mock scores, trust the official
|
||||
be inflated by questions you had already seen, so keep working on the weak domains before the exam. The
|
||||
free set has only 20 questions (one question = 5 points), so read it as a rough signal.
|
||||
|
||||
Decide after mock #3 (Sat 28 Nov) at the latest. If you are clearly not ready, it may be better to
|
||||
take **DVA-C03** after 1 December instead of rushing. Almost all of this material still applies. Ask
|
||||
your tutor to add the C03-specific topics. Check the cancel and reschedule deadline in your booking
|
||||
confirmation first: it decides how late you can still change your mind.
|
||||
If you are clearly not ready by 23 Nov, it may be better to take **DVA-C03** after 1 December
|
||||
instead of rushing. Almost all of this material still applies. Ask your tutor to add the C03-specific topics.
|
||||
@@ -22,6 +22,8 @@ The tests already pass. Read the code below, then delete the
|
||||
`# I AM NOT DONE` line and save the file.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
EXAM_CODE = "DVA-C02"
|
||||
DOMAINS = {
|
||||
1: "Development with AWS Services",
|
||||
|
||||
@@ -22,14 +22,15 @@ Note: SQS queue attributes are passed as a dict of *strings*
|
||||
(`{"VisibilityTimeout": "60"}`), a classic SDK gotcha.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import boto3
|
||||
|
||||
|
||||
def create_jobs_queue(name: str) -> str:
|
||||
sqs = boto3.client("sqs", region_name="eu-west-1")
|
||||
superQueue = sqs.create_queue(QueueName="name", Attributes={"VisibilityTimeout": "60"})
|
||||
return superQueue["QueueUrl"]
|
||||
sqs = boto3.client("sqs") # TODO: which region?
|
||||
# TODO: create the queue with a 60 second visibility timeout and return its URL
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -17,19 +17,18 @@ Fix ORDERS_READ_POLICY so that it:
|
||||
* applies to the table ARN AND to all of its indexes (and nothing else).
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
TABLE_ARN = "arn:aws:dynamodb:eu-west-3:123456789012:table/Orders"
|
||||
|
||||
ORDERS_READ_POLICY = {
|
||||
"Version": "2012-10-17", # TODO: is this the right version?
|
||||
"Version": "2008-10-17", # TODO: is this the right version?
|
||||
"Statement": [
|
||||
{
|
||||
"Sid": "ReadOrders",
|
||||
"Effect": "Allow",
|
||||
"Action": ["dynamodb:GetItem", "dynamodb:Query"], # TODO: least privilege!
|
||||
"Resource": [
|
||||
TABLE_ARN,
|
||||
TABLE_ARN+"/index/*"
|
||||
], # TODO: the table and its indexes only
|
||||
"Action": "dynamodb:*", # TODO: least privilege!
|
||||
"Resource": "*", # TODO: the table and its indexes only
|
||||
}
|
||||
],
|
||||
}
|
||||
|
||||
@@ -27,17 +27,14 @@ Implement:
|
||||
a string or a list. Conditions and NotAction are out of scope here.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import re
|
||||
|
||||
|
||||
def matches(pattern: str, value: str, case_sensitive: bool = True) -> bool:
|
||||
escaped = re.escape(pattern)
|
||||
escaped = escaped.replace("\*", ".*")
|
||||
escaped = escaped.replace("\?", ".")
|
||||
flag = 0
|
||||
if (not case_sensitive):
|
||||
flag = re.IGNORECASE
|
||||
return re.fullmatch(escaped, value, flags=flag) is not None
|
||||
# TODO: support the * and ? wildcards (hint: build a regular expression)
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def _as_list(value):
|
||||
@@ -45,24 +42,8 @@ def _as_list(value):
|
||||
|
||||
|
||||
def evaluate(policies: list[dict], action: str, resource: str) -> str:
|
||||
allowed = False
|
||||
for p in policies:
|
||||
p_statments = p["Statement"]
|
||||
for s in _as_list(p_statments):
|
||||
s_actions = s["Action"]
|
||||
s_resources = s["Resource"]
|
||||
s_effect = s["Effect"]
|
||||
for a in _as_list(s_actions):
|
||||
if matches(a, action, False):
|
||||
for r in _as_list(s_resources):
|
||||
if matches(r, resource):
|
||||
if s_effect == "Deny":
|
||||
return "explicitDeny"
|
||||
else:
|
||||
allowed = True
|
||||
if (allowed):
|
||||
return "allowed"
|
||||
return "implicitDeny"
|
||||
# TODO: implicit deny by default, explicit Allow overrides it, explicit Deny always wins
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -20,45 +20,19 @@ Implement `create_lambda_execution_role(iam, role_name, table_arn, logs_policy_a
|
||||
4. return the role ARN.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import json
|
||||
|
||||
from mypy_boto3_iam import IAMClient
|
||||
|
||||
|
||||
def create_lambda_execution_role(iam: IAMClient, role_name: str, table_arn: str, logs_policy_arn: str) -> str:
|
||||
TRUST_POLICY = {
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Sid": "lambdaTrustExec",
|
||||
"Effect": "Allow",
|
||||
"Action": "sts:AssumeRole",
|
||||
"Principal": {"Service": "lambda.amazonaws.com"}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
PERMISSION_POLICY = {
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Sid": "lambdaExec",
|
||||
"Effect": "Allow",
|
||||
"Action": "dynamodb:PutItem",
|
||||
"Resource": table_arn
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
# TODO 1: trust policy for the Lambda service + create_role
|
||||
role = iam.create_role(RoleName=role_name, AssumeRolePolicyDocument=json.dumps(TRUST_POLICY))
|
||||
# TODO 2: attach the logs managed policy
|
||||
iam.attach_role_policy(RoleName=role_name, PolicyArn=logs_policy_arn)
|
||||
# TODO 3: inline policy "dynamodb-write" (dynamodb:PutItem on table_arn only)
|
||||
iam.put_role_policy(RoleName=role_name, PolicyName="dynamodb-write", PolicyDocument=json.dumps(PERMISSION_POLICY))
|
||||
|
||||
# TODO 4: return the role ARN
|
||||
return role["Role"]["Arn"]
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -19,6 +19,8 @@ Complete BUCKET_POLICY (three statements with Sids "DenyInsecureTransport",
|
||||
"DenyUnencryptedUploads" and "AllowReaderRole"), then `apply_policy()`.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import json
|
||||
|
||||
from mypy_boto3_s3 import S3Client
|
||||
@@ -32,28 +34,14 @@ BUCKET_POLICY = {
|
||||
"Statement": [
|
||||
{
|
||||
"Sid": "DenyInsecureTransport",
|
||||
"Effect": "Deny",
|
||||
"Action": "s3:*",
|
||||
"Principal": "*",
|
||||
"Resource": [BUCKET_ARN, BUCKET_ARN+"/*"],
|
||||
"Condition": {"Bool": {"aws:SecureTransport": "false"}}
|
||||
# TODO: deny every S3 action, for everyone, on the bucket AND its objects, when TLS is not used
|
||||
},
|
||||
{
|
||||
"Sid": "DenyUnencryptedUploads",
|
||||
"Effect": "Deny",
|
||||
"Action": "s3:PutObject",
|
||||
"Principal": "*",
|
||||
"Resource": [BUCKET_ARN+"/*"],
|
||||
"Condition": {"StringNotEquals": {"s3:x-amz-server-side-encryption": "aws:kms"}}
|
||||
# TODO: deny PutObject unless the SSE header asks for aws:kms
|
||||
},
|
||||
{
|
||||
"Sid": "AllowReaderRole",
|
||||
"Effect": "Allow",
|
||||
"Action": "s3:GetObject",
|
||||
"Principal": {"AWS": READER_ROLE_ARN},
|
||||
"Resource": [BUCKET_ARN+"/*"],
|
||||
# TODO: allow READER_ROLE_ARN to get objects
|
||||
},
|
||||
],
|
||||
@@ -62,7 +50,8 @@ BUCKET_POLICY = {
|
||||
|
||||
def apply_policy(s3: S3Client) -> None:
|
||||
"""Attach BUCKET_POLICY to the bucket (the policy must be sent as a JSON string)."""
|
||||
s3.put_bucket_policy(Bucket=BUCKET, Policy=json.dumps(BUCKET_POLICY))
|
||||
# TODO
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -22,8 +22,12 @@ Fix HOME_FOLDER_POLICY so that it has two statements:
|
||||
the objects under `home/${aws:username}/`.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
BUCKET = "corp-docs"
|
||||
|
||||
aws = {"username": "BUG"} # (this line only exists so that the broken f-strings below can run)
|
||||
|
||||
HOME_FOLDER_POLICY = {
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
@@ -31,15 +35,14 @@ HOME_FOLDER_POLICY = {
|
||||
"Sid": "ListOwnFolder",
|
||||
"Effect": "Allow",
|
||||
"Action": "s3:ListBucket",
|
||||
"Resource": "arn:aws:s3:::"+BUCKET, # TODO: ListBucket applies to the bucket itself
|
||||
"Resource": f"arn:aws:s3:::{BUCKET}/*", # TODO: ListBucket applies to the bucket itself
|
||||
# TODO: add a StringLike condition on s3:prefix
|
||||
"Condition": {"StringLike": {"s3:prefix": "home/${aws:username}/*"}}
|
||||
},
|
||||
{
|
||||
"Sid": "ManageOwnFiles",
|
||||
"Effect": "Allow",
|
||||
"Action": ["s3:GetObject", "s3:PutObject", "s3:DeleteObject"], # TODO: users must also be able to delete
|
||||
"Resource": "arn:aws:s3:::"+BUCKET+"/home/${aws:username}/*", # TODO: this f-string eats the variable
|
||||
"Action": ["s3:GetObject", "s3:PutObject"], # TODO: users must also be able to delete
|
||||
"Resource": f"arn:aws:s3:::{BUCKET}/home/${aws}/*", # TODO: this f-string eats the variable
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@ Implement `resolve(...)` returning a tuple `(source_name, credentials_dict)`.
|
||||
Raise `LookupError` when no source has credentials.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
|
||||
def resolve(
|
||||
explicit: dict | None = None,
|
||||
@@ -42,26 +44,11 @@ def resolve(
|
||||
container_credentials: {"key": ..., "secret": ..., "token": ...} or None
|
||||
instance_metadata: {"key": ..., "secret": ..., "token": ...} or None
|
||||
"""
|
||||
|
||||
env = env or {}
|
||||
credentials_file = credentials_file or {}
|
||||
config_file = config_file or {}
|
||||
|
||||
profile = env.get("AWS_PROFILE", "default")
|
||||
|
||||
if (explicit is not None):
|
||||
return ("explicit", explicit)
|
||||
if (env.get("AWS_ACCESS_KEY_ID") is not None and env.get("AWS_SECRET_ACCESS_KEY") is not None):
|
||||
return ("env", {"key": env.get("AWS_ACCESS_KEY_ID"), "secret": env.get("AWS_SECRET_ACCESS_KEY"), "token": env.get("AWS_SESSION_TOKEN")})
|
||||
if (credentials_file.get(profile) is not None):
|
||||
return ("shared-credentials-file", credentials_file[profile])
|
||||
if (config_file.get(profile) is not None):
|
||||
return ("config-file", config_file[profile])
|
||||
if (container_credentials is not None):
|
||||
return ("container-role", container_credentials)
|
||||
if (instance_metadata is not None):
|
||||
return ("instance-profile", instance_metadata)
|
||||
raise LookupError
|
||||
# TODO: walk the chain in order and return the first match
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -19,24 +19,19 @@ Your task
|
||||
paginator fetches when pages hold `page_size` keys.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
from mypy_boto3_s3 import S3Client
|
||||
|
||||
|
||||
def list_all_keys(s3: S3Client, bucket: str, prefix: str = "") -> list[str]:
|
||||
keys = []
|
||||
paginator = s3.get_paginator("list_objects_v2")
|
||||
for page in paginator.paginate(Bucket=bucket, Prefix=prefix, PaginationConfig={"PageSize": 500}):
|
||||
for obj in page.get("Contents", []):
|
||||
keys.append(obj["Key"])
|
||||
return keys
|
||||
response = s3.list_objects_v2(Bucket=bucket, Prefix=prefix) # TODO: only the first page!
|
||||
return [obj["Key"] for obj in response.get("Contents", [])]
|
||||
|
||||
|
||||
def count_pages(s3: S3Client, bucket: str, page_size: int) -> int:
|
||||
count = 0
|
||||
paginator = s3.get_paginator("list_objects_v2")
|
||||
for page in paginator.paginate(Bucket=bucket, PaginationConfig={"PageSize": page_size}):
|
||||
count += 1
|
||||
return count
|
||||
# TODO: use a paginator with PaginationConfig
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -24,6 +24,8 @@ Your task
|
||||
retry n (n = 0, 1, 2...), and giving up after `max_attempts` calls.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import random
|
||||
import time
|
||||
|
||||
@@ -42,18 +44,13 @@ RETRYABLE_CODES = {
|
||||
|
||||
|
||||
def backoff_delay(attempt: int, base: float = 0.1, cap: float = 5.0, rand=random.random) -> float:
|
||||
return rand() * min(cap, base * 2**attempt)
|
||||
# TODO: exponential growth, capped, with full jitter
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def call_with_retries(fn, max_attempts: int = 5, sleep=time.sleep, rand=random.random, attempt=0):
|
||||
try:
|
||||
return fn()
|
||||
except ClientError as err:
|
||||
code = err.response["Error"]["Code"]
|
||||
if code not in RETRYABLE_CODES or attempt+1 == max_attempts:
|
||||
raise
|
||||
sleep(backoff_delay(attempt=attempt, rand=rand))
|
||||
return call_with_retries(fn, max_attempts=max_attempts, sleep=sleep, rand=rand, attempt=attempt+1)
|
||||
def call_with_retries(fn, max_attempts: int = 5, sleep=time.sleep, rand=random.random):
|
||||
# TODO: retry fn() on retryable errors only
|
||||
return fn()
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -22,19 +22,20 @@ Your task
|
||||
with a 15 minute (900 s) session.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import boto3
|
||||
|
||||
|
||||
def assume(role_arn: str, session_name: str, duration_seconds: int = 900) -> dict:
|
||||
stsClient = boto3.client(service_name="sts")
|
||||
role = stsClient.assume_role(RoleArn=role_arn, RoleSessionName=session_name, DurationSeconds=duration_seconds)
|
||||
return role["Credentials"]
|
||||
# TODO: call sts.assume_role and return the "Credentials" part of the response
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def client_as(role_arn: str, session_name: str, service: str):
|
||||
creds = assume(role_arn, session_name, 900)
|
||||
client = boto3.client(service, region_name="eu-west-3", aws_access_key_id=creds["AccessKeyId"], aws_secret_access_key=creds["SecretAccessKey"], aws_session_token=creds["SessionToken"])
|
||||
return client
|
||||
# TODO: build the client with the temporary credentials (all three parts!)
|
||||
return boto3.client(service, region_name="eu-west-3")
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -29,17 +29,16 @@ Your task
|
||||
a string partition key "pk", wait until it exists, return its status.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
from botocore.config import Config
|
||||
from mypy_boto3_dynamodb import DynamoDBClient
|
||||
import boto3
|
||||
|
||||
|
||||
def make_dynamodb_client() -> DynamoDBClient:
|
||||
config = Config(
|
||||
retries={"mode": "standard", "total_max_attempts": 10},
|
||||
connect_timeout=2, read_timeout=5,
|
||||
)
|
||||
return boto3.client("dynamodb", region_name="eu-west-3", config=config)
|
||||
# TODO: pass a botocore Config
|
||||
return boto3.client("dynamodb", region_name="eu-west-3")
|
||||
|
||||
|
||||
def create_table_and_wait(client: DynamoDBClient, name: str) -> str:
|
||||
@@ -49,8 +48,8 @@ def create_table_and_wait(client: DynamoDBClient, name: str) -> str:
|
||||
AttributeDefinitions=[{"AttributeName": "pk", "AttributeType": "S"}],
|
||||
KeySchema=[{"AttributeName": "pk", "KeyType": "HASH"}],
|
||||
)
|
||||
client.get_waiter("table_exists").wait(TableName=name)
|
||||
return client.describe_table(TableName=name)["Table"]["TableStatus"]
|
||||
# TODO: wait for the table with a waiter, then return describe_table(...)["Table"]["TableStatus"]
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -21,23 +21,23 @@ Your task
|
||||
WITHOUT downloading the object.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
from mypy_boto3_s3 import S3Client
|
||||
|
||||
|
||||
def create_bucket(s3: S3Client, name: str, region: str) -> None:
|
||||
if region == 'us-east-1':
|
||||
s3.create_bucket(Bucket=name)
|
||||
else:
|
||||
s3.create_bucket(Bucket=name, CreateBucketConfiguration={"LocationConstraint": region})
|
||||
s3.create_bucket(Bucket=name) # TODO: fails outside us-east-1
|
||||
|
||||
|
||||
def upload_report(s3: S3Client, bucket: str, key: str, body: bytes) -> str:
|
||||
return s3.put_object(Bucket=bucket, Key=key, Body=body, ContentType="application/pdf", Metadata={"owner": "finance"})["ETag"]
|
||||
# TODO: put_object with a Content-Type and user metadata, return the ETag
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def describe(s3: S3Client, bucket: str, key: str) -> dict:
|
||||
obj = s3.head_object(Bucket=bucket, Key=key)
|
||||
return {"content_type": obj["ContentType"], "size": obj["ContentLength"], "owner": obj["Metadata"]["owner"]}
|
||||
obj = s3.get_object(Bucket=bucket, Key=key) # TODO: this downloads the whole object!
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -23,17 +23,21 @@ Your task
|
||||
maximum size 2 MiB (2 * 1024 * 1024 bytes).
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
from mypy_boto3_s3 import S3Client
|
||||
|
||||
MAX_AVATAR_BYTES = 2 * 1024 * 1024
|
||||
|
||||
|
||||
def invoice_download_url(s3: S3Client, bucket: str, key: str) -> str:
|
||||
return s3.generate_presigned_url(ClientMethod="get_object", Params={"Bucket": bucket, "Key": key}, ExpiresIn=300)
|
||||
# TODO
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def avatar_upload_form(s3: S3Client, bucket: str, user_id: str) -> dict:
|
||||
return s3.generate_presigned_post(Bucket=bucket, Fields={"Content-Type": "image/png"}, Conditions=[["content-length-range", 0, MAX_AVATAR_BYTES], {"Content-Type": "image/png"}], ExpiresIn=600, Key="avatars/"+user_id+".png")
|
||||
# TODO: presigned POST with a size limit and a fixed Content-Type
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -25,30 +25,23 @@ Your task
|
||||
100 MiB, uses 16 MiB chunks and 10 threads.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
from boto3.s3.transfer import TransferConfig
|
||||
from mypy_boto3_s3 import S3Client
|
||||
|
||||
import math
|
||||
|
||||
MiB = 1024 * 1024
|
||||
|
||||
|
||||
def multipart_upload(s3: S3Client, bucket: str, key: str, data: bytes, part_size: int = 5 * MiB) -> int:
|
||||
upload_id = s3.create_multipart_upload(Bucket=bucket, Key=key)["UploadId"]
|
||||
parts = []
|
||||
for i in range(0, math.ceil(len(data)/part_size)):
|
||||
try:
|
||||
resp = s3.upload_part(Bucket=bucket, Key=key, UploadId=upload_id, Body=data[i*part_size:i * part_size + part_size], PartNumber=i+1)
|
||||
parts.append({"ETag": resp["ETag"], "PartNumber": i+1})
|
||||
except:
|
||||
s3.abort_multipart_upload(Bucket=bucket, Key=key, UploadId=upload_id)
|
||||
raise
|
||||
s3.complete_multipart_upload(Bucket=bucket, Key=key, UploadId=upload_id, MultipartUpload={'Parts': parts})
|
||||
return len(parts)
|
||||
# TODO: upload each chunk with upload_part (PartNumber starts at 1), collect the ETags,
|
||||
# complete the upload, return the number of parts. Abort the upload if anything fails.
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def transfer_config() -> TransferConfig:
|
||||
return TransferConfig(multipart_chunksize=16*MiB, use_threads=10, max_concurrency=10, multipart_threshold=100*MiB)
|
||||
return TransferConfig() # TODO
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -22,21 +22,23 @@ Your task
|
||||
* `encryption_of(s3, bucket, key)`: return (algorithm, kms_key_id or None).
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
from mypy_boto3_s3 import S3Client
|
||||
|
||||
|
||||
def put_encrypted(s3: S3Client, bucket: str, key: str, body: bytes, kms_key_id: str) -> None:
|
||||
s3.put_object(Bucket=bucket, Key=key, Body=body, SSEKMSKeyId=kms_key_id, ServerSideEncryption="aws:kms")
|
||||
s3.put_object(Bucket=bucket, Key=key, Body=body) # TODO: request SSE-KMS with this key
|
||||
|
||||
|
||||
def enforce_default_encryption(s3: S3Client, bucket: str, kms_key_id: str) -> None:
|
||||
s3.put_bucket_encryption(Bucket=bucket, ServerSideEncryptionConfiguration={"Rules": [{"ApplyServerSideEncryptionByDefault": {
|
||||
"SSEAlgorithm": "aws:kms", "KMSMasterKeyID": kms_key_id}, "BucketKeyEnabled": True}]})
|
||||
# TODO: put_bucket_encryption
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def encryption_of(s3: S3Client, bucket: str, key: str) -> tuple[str, str | None]:
|
||||
head = s3.head_object(Bucket=bucket, Key=key)
|
||||
return (head.get("ServerSideEncryption"), head.get("SSEKMSKeyId"))
|
||||
# TODO: use head_object
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -25,6 +25,8 @@ Your task
|
||||
(ID "logs-retention").
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
from mypy_boto3_s3 import S3Client
|
||||
|
||||
LOG_TRANSITIONS = [
|
||||
@@ -35,22 +37,15 @@ MIN_DAYS = {"STANDARD_IA": 30, "ONEZONE_IA": 30}
|
||||
|
||||
|
||||
def validate_transitions(transitions: list[dict]) -> None:
|
||||
min = 0
|
||||
for transition in transitions:
|
||||
storage = transition.get("StorageClass")
|
||||
days = transition.get("Days")
|
||||
if ("IA" in storage and days < 30):
|
||||
raise ValueError
|
||||
if (days < min):
|
||||
raise ValueError
|
||||
min = days
|
||||
# TODO
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def configure_logs_bucket(s3: S3Client, bucket: str) -> None:
|
||||
validate_transitions(LOG_TRANSITIONS)
|
||||
s3.put_bucket_versioning(Bucket=bucket, VersioningConfiguration={"Status": "Enabled"})
|
||||
s3.put_bucket_lifecycle_configuration(Bucket=bucket, LifecycleConfiguration={"Rules": [{"Filter": {"Prefix": "logs/"}, "Transitions": LOG_TRANSITIONS, "Expiration": {
|
||||
"Days": 365}, "NoncurrentVersionExpiration": {"NoncurrentDays": 30}, "AbortIncompleteMultipartUpload": {"DaysAfterInitiation": 7}, "ID": "logs-retention", "Status": "Enabled"}]})
|
||||
# TODO 1: enable versioning
|
||||
# TODO 2: put_bucket_lifecycle_configuration with the rule "logs-retention"
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -23,48 +23,27 @@ Your task
|
||||
* `notify_uploads(s3, bucket, queue_arn)`.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import json
|
||||
|
||||
from mypy_boto3_s3 import S3Client
|
||||
from mypy_boto3_sqs import SQSClient
|
||||
|
||||
|
||||
def SQS_POLICY(bucket):
|
||||
return {
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Sid": "allow bucket",
|
||||
"Effect": "Allow",
|
||||
"Action": ["sqs:SendMessage"],
|
||||
"Principal": {"Service": "s3.amazonaws.com"},
|
||||
"Condition": {"ArnLike": {"aws:SourceArn": "arn:aws:s3:::"+bucket}}
|
||||
}
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
def configure_cors(s3: S3Client, bucket: str, origin: str) -> None:
|
||||
# TODO: allow GET and PUT from `origin`, all request headers, expose ETag, cache preflight 3000 s
|
||||
s3.put_bucket_cors(Bucket=bucket, CORSConfiguration={"CORSRules": [{"AllowedOrigins": [origin], "AllowedMethods": ["GET", "PUT"],
|
||||
"AllowedHeaders": ["*"], "ExposeHeaders": ["ETag"], "MaxAgeSeconds": 3000}]})
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def allow_s3_to_send(sqs: SQSClient, queue_url: str, queue_arn: str, bucket: str) -> None:
|
||||
# TODO: set the queue "Policy" attribute so that only this bucket (via the S3 service) can send messages
|
||||
sqs.set_queue_attributes(QueueUrl=queue_url, Attributes={"Policy": json.dumps(SQS_POLICY(bucket))})
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def notify_uploads(s3: S3Client, bucket: str, queue_arn: str) -> None:
|
||||
# TODO: ObjectCreated events for keys starting with uploads/ and ending with .jpg
|
||||
s3.put_bucket_notification_configuration(
|
||||
Bucket=bucket,
|
||||
NotificationConfiguration={"QueueConfigurations": [{
|
||||
"QueueArn": queue_arn, "Events": ["s3:ObjectCreated:Put"],
|
||||
"Filter": {"Key": {"FilterRules": [{"Name": "prefix", "Value": "uploads/"},
|
||||
{"Name": "suffix", "Value": ".jpg"}]}},
|
||||
}]},
|
||||
)
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -22,17 +22,21 @@ Your task
|
||||
ignoring objects under OUTPUT_PREFIX.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
from urllib.parse import unquote_plus
|
||||
|
||||
OUTPUT_PREFIX = "thumbnails/"
|
||||
|
||||
|
||||
def objects_from_event(event: dict) -> list[tuple[str, str, int]]:
|
||||
return [(r["s3"]["bucket"]["name"], unquote_plus(r["s3"]["object"]["key"]), r["s3"]["object"]["size"]) for r in event["Records"]]
|
||||
# TODO: decode the keys!
|
||||
return [(r["s3"]["bucket"]["name"], r["s3"]["object"]["key"], r["s3"]["object"]["size"]) for r in event["Records"]]
|
||||
|
||||
|
||||
def handler(event, context):
|
||||
return {"to_process": [key for _, key, _ in objects_from_event(event) if not key.startswith(OUTPUT_PREFIX)]}
|
||||
# TODO: ignore our own output to avoid recursive invocations
|
||||
return {"to_process": [key for _, key, _ in objects_from_event(event)]}
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -24,15 +24,16 @@ Your task
|
||||
remain. Return the list of items that were NOT processed.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
|
||||
def handler(event, context):
|
||||
return {"greeting": "Hello, "+(event.get("name") or "world")+"!", "request_id": context.aws_request_id, "function": context.function_name}
|
||||
# TODO
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def process_batch(items: list, context, work, safety_ms: int = 10_000) -> list:
|
||||
for i, item in enumerate(items):
|
||||
if (context.get_remaining_time_in_millis() < safety_ms):
|
||||
return items[i:]
|
||||
for item in items: # TODO: stop early when the function is about to time out
|
||||
work(item)
|
||||
return []
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ Implement `get_table()` so that the table object is created at most once
|
||||
per execution environment, and use it in the handler.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import os
|
||||
|
||||
from mypy_boto3_dynamodb.service_resource import Table
|
||||
@@ -33,10 +35,7 @@ _table = None
|
||||
|
||||
|
||||
def get_table() -> Table:
|
||||
global _table
|
||||
if (_table is None):
|
||||
_table = TABLE_FACTORY(TABLE_NAME) # TODO: create once, then reuse
|
||||
return _table
|
||||
return TABLE_FACTORY(TABLE_NAME) # TODO: create once, then reuse
|
||||
|
||||
|
||||
def handler(event, context):
|
||||
|
||||
@@ -25,6 +25,8 @@ Your task
|
||||
An unknown status returns 400 with {"message": "invalid status"}.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import json
|
||||
|
||||
ALLOWED_ORIGIN = "https://app.example.com"
|
||||
@@ -37,16 +39,11 @@ VALID_STATUSES = {"OPEN", "SHIPPED"}
|
||||
|
||||
|
||||
def build_response(status_code: int, payload: dict) -> dict:
|
||||
# TODO: this shape gives a 502 Bad Gateway
|
||||
return {"statusCode": status_code, "body": json.dumps(payload), "headers": {"Content-Type": "application/json", "Access-Control-Allow-Origin": ALLOWED_ORIGIN}}
|
||||
return {"status": status_code, "body": payload} # TODO: this shape gives a 502 Bad Gateway
|
||||
|
||||
|
||||
def handler(event, context):
|
||||
status = (event.get("queryStringParameters") or {}).get("status")
|
||||
if status is None:
|
||||
return build_response(200, {"orders": [o for o in ORDERS]})
|
||||
elif status not in VALID_STATUSES:
|
||||
return build_response(400, {"message": "invalid status"})
|
||||
status = event["queryStringParameters"]["status"] # TODO: crashes when there is no query string
|
||||
return build_response(200, {"orders": [o for o in ORDERS if o["status"] == status]})
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ Implement `handler(event, context)`: process every record with
|
||||
message fail the whole batch. Report only the failed message IDs.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import json
|
||||
|
||||
PROCESSED = []
|
||||
@@ -34,13 +36,9 @@ def process(order: dict) -> None:
|
||||
|
||||
|
||||
def handler(event, context):
|
||||
failed = []
|
||||
for record in event["Records"]:
|
||||
try:
|
||||
process(json.loads(record["body"])) # TODO: one bad message makes the whole batch fail
|
||||
except:
|
||||
failed.append({"itemIdentifier": record["messageId"]})
|
||||
return {"batchItemFailures": failed}
|
||||
process(json.loads(record["body"])) # TODO: one bad message makes the whole batch fail
|
||||
return {}
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -22,6 +22,8 @@ Implement `handle_payment(table, event, now)`:
|
||||
* otherwise call charge(event["amount"]) and return "charged".
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import time
|
||||
|
||||
from botocore.exceptions import ClientError
|
||||
@@ -36,11 +38,6 @@ def charge(amount: int) -> None:
|
||||
|
||||
|
||||
def handle_payment(table: Table, event: dict, now=time.time) -> str:
|
||||
try:
|
||||
table.put_item(Item={"pk": event["payment_id"], "expires_at": int(now())+IDEMPOTENCY_TTL_SECONDS}, ConditionExpression="attribute_not_exists(pk)")
|
||||
except ClientError as err:
|
||||
if err.response["Error"]["Code"] == "ConditionalCheckFailedException":
|
||||
return "duplicate"
|
||||
charge(event["amount"]) # TODO: guard the side effect with a conditional write
|
||||
return "charged"
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ Your task
|
||||
* `sqs_visibility_timeout(function_timeout_s)`.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import math
|
||||
|
||||
@@ -30,22 +31,19 @@ MIN_UNRESERVED = 100
|
||||
|
||||
|
||||
def required_concurrency(rps: float, avg_duration_s: float) -> int:
|
||||
return round(rps * avg_duration_s)
|
||||
raise NotImplementedError # TODO
|
||||
|
||||
|
||||
def max_requests_per_second(concurrency: int, avg_duration_s: float) -> float:
|
||||
return round(concurrency / avg_duration_s)
|
||||
raise NotImplementedError # TODO
|
||||
|
||||
|
||||
def unreserved_pool(account_limit: int, reservations: dict[str, int]) -> int:
|
||||
remaining = account_limit - sum(reservations[i] for i in reservations)
|
||||
if remaining < 100:
|
||||
raise ValueError
|
||||
return remaining
|
||||
raise NotImplementedError # TODO
|
||||
|
||||
|
||||
def sqs_visibility_timeout(function_timeout_s: int) -> int:
|
||||
return 6*function_timeout_s
|
||||
return function_timeout_s # TODO: what does AWS recommend?
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -24,6 +24,8 @@ Implement `deploy(lambda_client, role_arn, zip_bytes, failure_queue_arn)`
|
||||
and return the function configuration (get_function_configuration).
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
from mypy_boto3_lambda import LambdaClient
|
||||
|
||||
|
||||
@@ -34,15 +36,8 @@ def deploy(lambda_client: LambdaClient, role_arn: str, zip_bytes: bytes, failure
|
||||
Role=role_arn,
|
||||
Handler="app.handler",
|
||||
Code={"ZipFile": zip_bytes},
|
||||
Timeout=60,
|
||||
Environment={"Variables": {"BUCKET": "thumbs", "LOG_LEVEL": "INFO"}},
|
||||
TracingConfig={"Mode": "Active"},
|
||||
EphemeralStorage={"Size": 2048},
|
||||
MemorySize=1024,
|
||||
Architectures=["arm64"]
|
||||
# TODO: memory, timeout, environment, tracing, ephemeral storage, architecture
|
||||
)
|
||||
lambda_client.put_function_event_invoke_config(FunctionName="thumbnailer", MaximumEventAgeInSeconds=3600, MaximumRetryAttempts=1,
|
||||
DestinationConfig={"OnFailure": {"Destination": failure_queue_arn}})
|
||||
# TODO: asynchronous invocation config (retries, max event age, on-failure destination)
|
||||
return lambda_client.get_function_configuration(FunctionName="thumbnailer")
|
||||
|
||||
|
||||
@@ -22,20 +22,23 @@ Your task
|
||||
* `promote(client, name, candidate)`: 100% of "live" on `candidate`.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
from mypy_boto3_lambda import LambdaClient
|
||||
|
||||
|
||||
def release(client: LambdaClient, name: str, zip_bytes: bytes) -> str:
|
||||
client.update_function_code(FunctionName=name, ZipFile=zip_bytes)
|
||||
return client.publish_version(FunctionName=name).get('Version')
|
||||
return "$LATEST" # TODO: publish an immutable version instead
|
||||
|
||||
|
||||
def start_canary(client: LambdaClient, name: str, stable: str, candidate: str, weight: float = 0.1) -> None:
|
||||
client.update_alias(FunctionName=name, Name="live", FunctionVersion=stable, RoutingConfig={"AdditionalVersionWeights": {candidate: weight}})
|
||||
client.update_alias(FunctionName=name, Name="live", FunctionVersion=candidate) # TODO: 100% at once is not a canary
|
||||
|
||||
|
||||
def promote(client: LambdaClient, name: str, candidate: str) -> None:
|
||||
client.update_alias(FunctionName=name, FunctionVersion=candidate, Name="live", RoutingConfig={"AdditionalVersionWeights": {}})
|
||||
# TODO
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -26,6 +26,8 @@ Your task
|
||||
call `orders:<alias>` for any stage, method GET, path /orders.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
from mypy_boto3_apigateway import APIGatewayClient
|
||||
from mypy_boto3_lambda import LambdaClient
|
||||
|
||||
@@ -45,22 +47,13 @@ def build_api(apigw: APIGatewayClient) -> str:
|
||||
resource_id = apigw.create_resource(restApiId=api_id, parentId=root_id, pathPart="orders")["id"]
|
||||
apigw.put_method(restApiId=api_id, resourceId=resource_id, httpMethod="GET", authorizationType="NONE")
|
||||
# TODO 1: AWS_PROXY integration (Lambda is always invoked with POST, whatever the client method)
|
||||
apigw.put_integration(restApiId=api_id, resourceId=resource_id, httpMethod="GET", type="AWS_PROXY", uri=LAMBDA_URI_TEMPLATE.format(function=FUNCTION_ARN), integrationHttpMethod="POST")
|
||||
# TODO 2: deploy to the stages "dev" and "prod" with their lambdaAlias variable
|
||||
apigw.create_deployment(restApiId=api_id, stageName="dev", variables={"lambdaAlias": "dev"})
|
||||
apigw.create_deployment(restApiId=api_id, stageName="prod", variables={"lambdaAlias": "prod"})
|
||||
return api_id
|
||||
|
||||
|
||||
def grant_invoke(lambda_client: LambdaClient, api_id: str, alias: str) -> None:
|
||||
lambda_client.add_permission(
|
||||
FunctionName="orders",
|
||||
Qualifier=alias,
|
||||
StatementId=f"apigw-{alias}",
|
||||
Action="lambda:InvokeFunction",
|
||||
Principal="apigateway.amazonaws.com",
|
||||
SourceArn=f"arn:aws:execute-api:{REGION}:{ACCOUNT}:{api_id}/*/GET/orders",
|
||||
)
|
||||
# TODO: resource-based permission on the alias
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -25,14 +25,14 @@ Implement `onboard_partner(apigw, api_id, stage, partner)`:
|
||||
4. return the key id.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
from mypy_boto3_apigateway import APIGatewayClient
|
||||
|
||||
|
||||
def onboard_partner(apigw: APIGatewayClient, api_id: str, stage: str, partner: str) -> str:
|
||||
key = apigw.create_api_key(name=partner, enabled=True)
|
||||
plan = apigw.create_usage_plan(name="basic-"+partner, apiStages=[{"apiId": api_id, "stage": stage}], quota={"limit": 1000, "period": "DAY"}, throttle={"rateLimit": 10, "burstLimit": 20})
|
||||
apigw.create_usage_plan_key(usagePlanId=plan.get("id"), keyId=key.get("id"), keyType="key")
|
||||
return key["id"]
|
||||
# TODO
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -26,6 +26,8 @@ Your task
|
||||
Implement `stage_wildcard(method_arn)`, `policy(...)` and `handler(event, context)`.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
TOKENS = {
|
||||
"tok-alice": {"user": "alice", "tier": "gold", "revoked": False},
|
||||
"tok-bob": {"user": "bob", "tier": "free", "revoked": True},
|
||||
@@ -33,33 +35,16 @@ TOKENS = {
|
||||
|
||||
|
||||
def stage_wildcard(method_arn: str) -> str:
|
||||
api_arn, _, path = method_arn.partition("/") # ".../a1b2c3" and "prod/GET/orders/42"
|
||||
stage = path.split("/")[0]
|
||||
return f"{api_arn}/{stage}/*/*"
|
||||
return method_arn # TODO: allow every method and path of the stage
|
||||
|
||||
|
||||
def policy(principal_id: str, effect: str, resource: str, context: dict | None = None) -> dict:
|
||||
response = {
|
||||
"principalId": principal_id,
|
||||
"policyDocument": {
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [{"Action": "execute-api:Invoke", "Effect": effect, "Resource": resource}],
|
||||
},
|
||||
}
|
||||
if context:
|
||||
response["context"] = context
|
||||
return response
|
||||
raise NotImplementedError # TODO
|
||||
|
||||
|
||||
def handler(event, context):
|
||||
token = event.get("authorizationToken", "").removeprefix("Bearer ").strip()
|
||||
info = TOKENS.get(token)
|
||||
if info is None:
|
||||
raise Exception("Unauthorized")
|
||||
resource = stage_wildcard(event["methodArn"])
|
||||
if info["revoked"]:
|
||||
return policy(info["user"], "Deny", resource)
|
||||
return policy(info["user"], "Allow", resource, {"user": info["user"], "tier": info["tier"]})
|
||||
# TODO: 401 for unknown tokens, Deny for revoked ones, Allow (stage wildcard + context) otherwise
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -21,25 +21,17 @@ Your task
|
||||
* `wcu(item_kb, writes_per_second, transactional=False)`.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import math
|
||||
|
||||
|
||||
def rcu(item_kb: float, reads_per_second: int, mode: str = "eventual") -> int:
|
||||
mode_mul = 1
|
||||
if mode == "eventual":
|
||||
mode_mul = 0.5
|
||||
if mode == "transactional":
|
||||
mode_mul = 2
|
||||
item_kb_mul = math.ceil(item_kb/4)
|
||||
return math.ceil(reads_per_second * item_kb_mul * mode_mul)
|
||||
raise NotImplementedError # TODO
|
||||
|
||||
|
||||
def wcu(item_kb: float, writes_per_second: int, transactional: bool = False) -> int:
|
||||
transactional_mul = 1
|
||||
if transactional:
|
||||
transactional_mul = 2
|
||||
item_kb_mul = math.ceil(item_kb/1)
|
||||
return math.ceil(writes_per_second * item_kb_mul * transactional_mul)
|
||||
raise NotImplementedError # TODO
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -21,6 +21,8 @@ Your task
|
||||
Complete the five functions below.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
from datetime import datetime, timezone
|
||||
|
||||
from mypy_boto3_dynamodb import DynamoDBClient
|
||||
@@ -28,34 +30,31 @@ from mypy_boto3_dynamodb.service_resource import Table
|
||||
|
||||
|
||||
def create_orders_table(client: DynamoDBClient) -> None:
|
||||
client.create_table(TableName="Orders", AttributeDefinitions=[{"AttributeName": "order_id", "AttributeType": "S"}, {"AttributeName": "customer_id", "AttributeType": "S"}],
|
||||
KeySchema=[{"AttributeName": "order_id", "KeyType": "RANGE"}, {"AttributeName": "customer_id", "KeyType": "HASH"}], BillingMode="PAY_PER_REQUEST")
|
||||
# TODO: composite primary key, on-demand billing
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def put_order(table: Table, order: dict) -> None:
|
||||
table.put_item(Item=order)
|
||||
raise NotImplementedError # TODO
|
||||
|
||||
|
||||
def get_order(table: Table, customer_id: str, order_id: str, consistent: bool = False) -> dict | None:
|
||||
response = table.get_item(Key={"customer_id": customer_id, "order_id": order_id}, ConsistentRead=consistent) # TODO: full key? consistency?
|
||||
return response.get("Item") # TODO: what if the item does not exist?
|
||||
response = table.get_item(Key={"customer_id": customer_id}) # TODO: full key? consistency?
|
||||
return response["Item"] # TODO: what if the item does not exist?
|
||||
|
||||
|
||||
def mark_shipped(table: Table, customer_id: str, order_id: str) -> dict:
|
||||
shipped_at = datetime.now(timezone.utc).isoformat()
|
||||
response = table.update_item(
|
||||
Key={"customer_id": customer_id, "order_id": order_id},
|
||||
UpdateExpression="SET #s = :s, shipped_at = :t", # TODO: "status" is a reserved word
|
||||
ExpressionAttributeNames={"#s": "status"},
|
||||
UpdateExpression="SET status = :s, shipped_at = :t", # TODO: "status" is a reserved word
|
||||
ExpressionAttributeValues={":s": "SHIPPED", ":t": shipped_at},
|
||||
ReturnValues="ALL_NEW"
|
||||
)
|
||||
return response.get("Attributes") # TODO: ask for the new values
|
||||
return response["Attributes"] # TODO: ask for the new values
|
||||
|
||||
|
||||
def delete_order(table: Table, customer_id: str, order_id: str) -> dict | None:
|
||||
deleted = table.delete_item(Key={"customer_id": customer_id, "order_id": order_id}, ReturnValues="ALL_OLD")
|
||||
return deleted.get("Attributes")
|
||||
raise NotImplementedError # TODO: return the deleted item (or None)
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -22,22 +22,16 @@ order of the customer with order_date >= since, oldest first, using Query
|
||||
and following pagination.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
from boto3.dynamodb.conditions import Attr, Key # noqa: F401
|
||||
from mypy_boto3_dynamodb.service_resource import Table
|
||||
|
||||
|
||||
def orders_since(table: Table, customer_id: str, since: str, page_size: int = 100) -> list[dict]:
|
||||
items = []
|
||||
kwargs = {
|
||||
"KeyConditionExpression": Key("customer_id").eq(customer_id) & Key("order_date").gte(since),
|
||||
"Limit": page_size,
|
||||
}
|
||||
while True:
|
||||
response = table.query(**kwargs)
|
||||
items.extend(response["Items"])
|
||||
if "LastEvaluatedKey" not in response:
|
||||
return items
|
||||
kwargs["ExclusiveStartKey"] = response["LastEvaluatedKey"]
|
||||
# TODO: this scans the whole table AND stops after the first page
|
||||
response = table.scan(FilterExpression=Attr("customer_id").eq(customer_id) & Attr("order_date").gte(since), Limit=page_size)
|
||||
return response["Items"]
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -25,6 +25,8 @@ Your task
|
||||
* `open_tickets_since(table, since)`: query the index.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
from boto3.dynamodb.conditions import Key
|
||||
from mypy_boto3_dynamodb import DynamoDBClient
|
||||
from mypy_boto3_dynamodb.service_resource import Table
|
||||
@@ -36,10 +38,8 @@ def create_tickets_table(client: DynamoDBClient) -> None:
|
||||
client.create_table(
|
||||
TableName="Tickets",
|
||||
BillingMode="PAY_PER_REQUEST",
|
||||
AttributeDefinitions=[{"AttributeName": "ticket_id", "AttributeType": "S"}, {"AttributeName": "status", "AttributeType": "S"}, {"AttributeName": "created_at", "AttributeType": "S"}],
|
||||
AttributeDefinitions=[{"AttributeName": "ticket_id", "AttributeType": "S"}],
|
||||
KeySchema=[{"AttributeName": "ticket_id", "KeyType": "HASH"}],
|
||||
GlobalSecondaryIndexes=[{"IndexName": INDEX, "Projection": {"ProjectionType": "INCLUDE", "NonKeyAttributes": ["title"]},
|
||||
"KeySchema": [{"AttributeName": "status", "KeyType": "HASH"}, {"AttributeName": "created_at", "KeyType": "RANGE"}]}]
|
||||
# TODO: add the GSI (and the attribute definitions its keys need)
|
||||
)
|
||||
|
||||
@@ -48,7 +48,7 @@ def open_tickets_since(table: Table, since: str) -> list[dict]:
|
||||
response = table.query(
|
||||
IndexName=INDEX,
|
||||
KeyConditionExpression=Key("status").eq("OPEN") & Key("created_at").gte(since),
|
||||
ConsistentRead=False, # TODO: is this allowed on a GSI?
|
||||
ConsistentRead=True, # TODO: is this allowed on a GSI?
|
||||
)
|
||||
return response["Items"]
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ version that was read (0 for a brand-new profile). Return the new version
|
||||
number, or raise ConflictError if the stored version changed.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
from botocore.exceptions import ClientError
|
||||
from mypy_boto3_dynamodb.service_resource import Table
|
||||
|
||||
@@ -33,12 +35,7 @@ class ConflictError(Exception):
|
||||
def save_profile(table: Table, profile: dict) -> int:
|
||||
expected = profile["version"]
|
||||
item = {**profile, "version": expected + 1}
|
||||
try:
|
||||
table.put_item(Item=item, ConditionExpression="attribute_not_exists(pk) or version = :expected",
|
||||
ExpressionAttributeValues={":expected": expected}) # TODO: only if nobody changed the item since we read it
|
||||
except ClientError as e:
|
||||
if e.response["Error"]["Code"] == "ConditionalCheckFailedException":
|
||||
raise ConflictError
|
||||
table.put_item(Item=item) # TODO: only if nobody changed the item since we read it
|
||||
return expected + 1
|
||||
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ Your task
|
||||
* `enable_ttl(client, table_name)`: turn TTL on for `expires_at`.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import time
|
||||
|
||||
from mypy_boto3_dynamodb import DynamoDBClient
|
||||
@@ -32,17 +34,19 @@ from mypy_boto3_dynamodb.service_resource import Table
|
||||
|
||||
|
||||
def increment_views(table: Table, page_id: str) -> int:
|
||||
views = table.update_item(Key={"pk": page_id}, UpdateExpression="ADD view_count :one", ExpressionAttributeValues={":one": 1}, ReturnValues="UPDATED_NEW")
|
||||
return views["Attributes"]["view_count"]
|
||||
item = table.get_item(Key={"pk": page_id}).get("Item", {}) # TODO: read-modify-write is not atomic
|
||||
views = int(item.get("view_count", 0)) + 1
|
||||
table.put_item(Item={"pk": page_id, "view_count": views})
|
||||
return views
|
||||
|
||||
|
||||
def store_session(table: Table, session_id: str, user: str, ttl_seconds: int = 3600, now=time.time) -> None:
|
||||
expires_at = int(now()) + ttl_seconds # TODO: wrong unit for DynamoDB TTL
|
||||
expires_at = int(now() * 1000) + ttl_seconds * 1000 # TODO: wrong unit for DynamoDB TTL
|
||||
table.put_item(Item={"pk": session_id, "user": user, "expires_at": expires_at})
|
||||
|
||||
|
||||
def enable_ttl(client: DynamoDBClient, table_name: str) -> None:
|
||||
client.update_time_to_live(TableName=table_name, TimeToLiveSpecification={"AttributeName": "expires_at", "Enabled": True})
|
||||
raise NotImplementedError # TODO
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -23,6 +23,8 @@ low-level (typed) items:
|
||||
* raise RuntimeError when items remain unprocessed after `max_retries` retries.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import time
|
||||
|
||||
from mypy_boto3_dynamodb import DynamoDBClient
|
||||
@@ -33,20 +35,12 @@ BASE_DELAY = 0.05
|
||||
|
||||
def chunks(items: list, size: int = BATCH_SIZE):
|
||||
for start in range(0, len(items), size):
|
||||
yield items[start: start + size]
|
||||
yield items[start : start + size]
|
||||
|
||||
|
||||
def batch_put(client: DynamoDBClient, table_name: str, items: list[dict], sleep=time.sleep, max_retries: int = 5) -> None:
|
||||
for chunk in chunks(items):
|
||||
request = {table_name: [{"PutRequest": {"Item": item}} for item in chunk]}
|
||||
for attempt in range(max_retries + 1):
|
||||
unprocessed = client.batch_write_item(RequestItems=request).get("UnprocessedItems") or {}
|
||||
if not unprocessed:
|
||||
break
|
||||
if attempt == max_retries:
|
||||
raise RuntimeError(f"{sum(len(v) for v in unprocessed.values())} items still unprocessed")
|
||||
sleep(BASE_DELAY * 2**attempt)
|
||||
request = unprocessed
|
||||
request = {table_name: [{"PutRequest": {"Item": item}} for item in items]} # TODO: max 25 per call
|
||||
client.batch_write_item(RequestItems=request) # TODO: what about UnprocessedItems?
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -25,6 +25,8 @@ table "Accounts" (key "pk", numeric attribute "balance"):
|
||||
4. raise InsufficientFunds when the debit condition fails.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
from botocore.exceptions import ClientError
|
||||
from mypy_boto3_dynamodb import DynamoDBClient
|
||||
|
||||
@@ -35,22 +37,9 @@ class InsufficientFunds(Exception):
|
||||
|
||||
def transfer(client: DynamoDBClient, from_id: str, to_id: str, amount: int, transfer_id: str) -> None:
|
||||
value = {":amount": {"N": str(amount)}}
|
||||
try:
|
||||
client.transact_write_items(TransactItems=[{"Update": {"TableName": "Accounts", "Key": {"pk": {"S": from_id}},
|
||||
"UpdateExpression": "SET balance = balance - :amount", "ExpressionAttributeValues": value, "ConditionExpression": "balance >= :amount"}},
|
||||
{"Update": {"TableName": "Accounts", "Key": {"pk": {"S": to_id}}, "UpdateExpression": "SET balance = balance + :amount",
|
||||
"ExpressionAttributeValues": value, "ConditionExpression": "attribute_exists(pk)"}},
|
||||
{"Put": {"TableName": "Accounts", "Item": {"pk": {"S": "transfer#"+transfer_id},
|
||||
"amount": {"N": str(amount)}}, "ConditionExpression": "attribute_not_exists(pk)"}}
|
||||
])
|
||||
|
||||
except ClientError as e:
|
||||
if (
|
||||
e.response["Error"]["Code"] == "TransactionCanceledException"
|
||||
and e.response["CancellationReasons"][0]["Code"] == "ConditionalCheckFailed"
|
||||
):
|
||||
raise InsufficientFunds from e
|
||||
raise
|
||||
# TODO: three separate writes are NOT atomic, use transact_write_items
|
||||
client.update_item(TableName="Accounts", Key={"pk": {"S": from_id}}, UpdateExpression="SET balance = balance - :amount", ExpressionAttributeValues=value)
|
||||
client.update_item(TableName="Accounts", Key={"pk": {"S": to_id}}, UpdateExpression="SET balance = balance + :amount", ExpressionAttributeValues=value)
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -25,28 +25,20 @@ Implement `handler(event, context)` for a Users table stream
|
||||
* REMOVE → ("goodbye", old email)
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
from boto3.dynamodb.types import TypeDeserializer
|
||||
|
||||
_deserializer = TypeDeserializer()
|
||||
|
||||
|
||||
def to_python(image: dict) -> dict:
|
||||
return {key: _deserializer.deserialize(value) for key, value in image.items()}
|
||||
raise NotImplementedError # TODO
|
||||
|
||||
|
||||
def handler(event, context) -> list[tuple[str, str]]:
|
||||
actions = []
|
||||
for record in event["Records"]:
|
||||
change = record["dynamodb"]
|
||||
new = to_python(change.get("NewImage", {}))
|
||||
old = to_python(change.get("OldImage", {}))
|
||||
if record["eventName"] == "INSERT":
|
||||
actions.append(("welcome", new["email"]))
|
||||
elif record["eventName"] == "MODIFY" and old.get("email") != new.get("email"):
|
||||
actions.append(("confirm-email", new["email"]))
|
||||
elif record["eventName"] == "REMOVE":
|
||||
actions.append(("goodbye", old["email"]))
|
||||
return actions
|
||||
# TODO
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -20,6 +20,8 @@ Implement `get_product(product_id, cache, db, ttl)` using cache-aside.
|
||||
`cache` behaves like a tiny Redis: get(key) → value or None, set(key, value, ttl).
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
|
||||
class TTLCache:
|
||||
"""In-memory cache with expiry, driven by an injectable clock."""
|
||||
@@ -39,11 +41,7 @@ class TTLCache:
|
||||
|
||||
|
||||
def get_product(product_id: str, cache: TTLCache, db, ttl: int = 300):
|
||||
product = cache.get(product_id)
|
||||
if product is None:
|
||||
product = db.load(product_id)
|
||||
cache.set(product_id, product, ttl=ttl)
|
||||
return product
|
||||
return db.load(product_id) # TODO: check the cache first, populate it on a miss
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -22,6 +22,8 @@ Your task
|
||||
Both use the key f"product:{product['id']}" (same as cache_1).
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
from typing import Any
|
||||
|
||||
|
||||
@@ -31,12 +33,10 @@ def _key(product: dict) -> str:
|
||||
|
||||
def update_write_through(product: dict, cache: Any, db: Any, ttl: int = 300) -> None:
|
||||
db.save(product) # TODO: keep the cache in sync
|
||||
cache.set(_key(product), product, ttl)
|
||||
|
||||
|
||||
def update_and_invalidate(product: dict, cache: Any, db: Any) -> None:
|
||||
db.save(product) # TODO: keep the cache in sync
|
||||
cache.delete(_key(product))
|
||||
raise NotImplementedError # TODO
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -24,6 +24,8 @@ Your task
|
||||
restricted to an IP range.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
from botocore.signers import CloudFrontSigner
|
||||
@@ -35,21 +37,17 @@ def make_signer(key_pair_id: str, private_key_pem: bytes) -> CloudFrontSigner:
|
||||
private_key = serialization.load_pem_private_key(private_key_pem, password=None)
|
||||
|
||||
def rsa_signer(message: bytes) -> bytes:
|
||||
return private_key.sign(
|
||||
message,
|
||||
padding.PKCS1v15(),
|
||||
hashes.SHA1(),
|
||||
)
|
||||
raise NotImplementedError # TODO: RSA PKCS#1 v1.5 signature with SHA-1
|
||||
|
||||
return CloudFrontSigner(key_pair_id, rsa_signer)
|
||||
|
||||
|
||||
def signed_url(signer: CloudFrontSigner, url: str, expires_at: datetime) -> str:
|
||||
return signer.generate_presigned_url(url=url, date_less_than=expires_at)
|
||||
raise NotImplementedError # TODO
|
||||
|
||||
|
||||
def signed_url_for_office(signer: CloudFrontSigner, url: str, expires_at: datetime, cidr: str) -> str:
|
||||
return signer.generate_presigned_url(url=url, policy=signer.build_policy(resource=url, date_less_than=expires_at, ip_address=cidr))
|
||||
raise NotImplementedError # TODO
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -26,6 +26,8 @@ Write two patterns:
|
||||
Then implement `route(events, sqs, bus, rule_name, pattern, queue_url)`.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import json
|
||||
|
||||
from mypy_boto3_events import EventBridgeClient
|
||||
@@ -33,21 +35,19 @@ from mypy_boto3_sqs import SQSClient
|
||||
|
||||
UPLOAD_PATTERN = {
|
||||
"source": ["aws.s3"],
|
||||
"detail-type": ["Object Created"],
|
||||
"detail": {"bucket": {"name": ["media-uploads"]}, "object": {"key": [{"prefix": "raw/"}]}},
|
||||
# TODO: detail-type, bucket name, key prefix
|
||||
}
|
||||
|
||||
BIG_ORDER_PATTERN = {
|
||||
"source": ["shop.orders"],
|
||||
"detail-type": ["OrderPlaced"],
|
||||
"detail": {"amount": [{"numeric": [">=", 100]}], "country": [{"anything-but": ["TEST"]}]},
|
||||
"source": "shop.orders", # TODO: values must be lists
|
||||
# TODO: detail-type, amount >= 100, country is not TEST
|
||||
}
|
||||
|
||||
|
||||
def route(events: EventBridgeClient, sqs: SQSClient, bus: str, rule_name: str, pattern: dict, queue_url: str) -> None:
|
||||
queue_arn = sqs.get_queue_attributes(QueueUrl=queue_url, AttributeNames=["QueueArn"])["Attributes"]["QueueArn"]
|
||||
events.put_rule(Name=rule_name, EventBusName=bus, EventPattern=json.dumps(pattern), State="ENABLED")
|
||||
events.put_targets(Rule=rule_name, EventBusName=bus, Targets=[{"Id": "queue", "Arn": queue_arn}])
|
||||
# TODO: create the rule on the bus, then add the queue as a target
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -26,6 +26,8 @@ Your task
|
||||
* `publish(sns, topic_arn, event_type, country, payload)`.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import json
|
||||
|
||||
from mypy_boto3_sns import SNSClient
|
||||
@@ -44,26 +46,17 @@ def wire(sns: SNSClient, sqs: SQSClient) -> dict:
|
||||
topic_arn = sns.create_topic(Name="orders")["TopicArn"]
|
||||
result = {"topic": topic_arn}
|
||||
filters = {
|
||||
"billing": {"event_type": ["order_placed", "order_refunded"]},
|
||||
"shipping": {"event_type": ["order_placed"], "country": ["FR", "BE"]},
|
||||
# TODO: one filter policy per filtered queue
|
||||
}
|
||||
for name in QUEUES:
|
||||
url, arn = _queue(sqs, name)
|
||||
result[name] = url
|
||||
attributes = {"FilterPolicy": json.dumps(filters[name])} if name in filters else {"RawMessageDelivery": "true"}
|
||||
sns.subscribe(TopicArn=topic_arn, Protocol="sqs", Endpoint=arn, Attributes=attributes)
|
||||
sns.subscribe(TopicArn=topic_arn, Protocol="sqs", Endpoint=arn) # TODO: filter policy / raw delivery
|
||||
return result
|
||||
|
||||
|
||||
def publish(sns: SNSClient, topic_arn: str, event_type: str, country: str, payload: dict) -> None:
|
||||
sns.publish(
|
||||
TopicArn=topic_arn,
|
||||
Message=json.dumps(payload),
|
||||
MessageAttributes={
|
||||
"event_type": {"DataType": "String", "StringValue": event_type},
|
||||
"country": {"DataType": "String", "StringValue": country},
|
||||
},
|
||||
)
|
||||
sns.publish(TopicArn=topic_arn, Message=json.dumps(payload)) # TODO: filter policies need message attributes
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -27,34 +27,26 @@ Your task
|
||||
successful ones. Return the number of messages processed successfully.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import json
|
||||
|
||||
from mypy_boto3_sqs import SQSClient
|
||||
|
||||
|
||||
def create_orders_queue(sqs: SQSClient) -> str:
|
||||
# TODO: attributes
|
||||
return sqs.create_queue(QueueName="orders", Attributes={"ReceiveMessageWaitTimeSeconds": "20", "VisibilityTimeout": "120", "MessageRetentionPeriod": str(7 * 24 * 60 * 60)})["QueueUrl"]
|
||||
return sqs.create_queue(QueueName="orders")["QueueUrl"] # TODO: attributes
|
||||
|
||||
|
||||
def send_order(sqs: SQSClient, url: str, order: dict) -> str:
|
||||
return sqs.send_message(QueueUrl=url, MessageBody=json.dumps(order), MessageAttributes={
|
||||
"type": {"DataType": "String", "StringValue": "order"}
|
||||
})["MessageId"]
|
||||
raise NotImplementedError # TODO
|
||||
|
||||
|
||||
def consume_once(sqs: SQSClient, url: str, process) -> int:
|
||||
response = sqs.receive_message(QueueUrl=url, MaxNumberOfMessages=10) # TODO: long polling, up to 10 messages
|
||||
successes = 0
|
||||
response = sqs.receive_message(QueueUrl=url) # TODO: long polling, up to 10 messages
|
||||
for message in response.get("Messages", []):
|
||||
try:
|
||||
process(json.loads(message["Body"])) # TODO: delete on success, survive failures
|
||||
sqs.delete_message(QueueUrl=url, ReceiptHandle=message["ReceiptHandle"])
|
||||
successes += 1
|
||||
except:
|
||||
continue
|
||||
|
||||
return successes
|
||||
process(json.loads(message["Body"])) # TODO: delete on success, survive failures
|
||||
return len(response.get("Messages", []))
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -26,22 +26,16 @@ visibility timeout, redrive to the DLQ after `max_receives` receives).
|
||||
Return (queue_url, dlq_url).
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import json
|
||||
|
||||
from mypy_boto3_sqs import SQSClient
|
||||
|
||||
|
||||
def create_queue_with_dlq(sqs: SQSClient, name: str, max_receives: int = 3) -> tuple[str, str]:
|
||||
dlq_url = sqs.create_queue(QueueName=f"{name}-dlq", Attributes={"MessageRetentionPeriod": str(14*24*60*60)})["QueueUrl"] # TODO: retention
|
||||
dlq_arn = dlq_arn = sqs.get_queue_attributes(
|
||||
QueueUrl=dlq_url,
|
||||
AttributeNames=["QueueArn"],
|
||||
)["Attributes"]["QueueArn"]
|
||||
queue_url = sqs.create_queue(QueueName=name, Attributes={"MessageRetentionPeriod": str(4*24*60*60), "VisibilityTimeout": "30",
|
||||
"RedrivePolicy": json.dumps({
|
||||
"deadLetterTargetArn": dlq_arn,
|
||||
"maxReceiveCount": str(max_receives),
|
||||
})})["QueueUrl"] # TODO: retention, visibility timeout, redrive policy
|
||||
dlq_url = sqs.create_queue(QueueName=f"{name}-dlq")["QueueUrl"] # TODO: retention
|
||||
queue_url = sqs.create_queue(QueueName=name)["QueueUrl"] # TODO: retention, visibility timeout, redrive policy
|
||||
return queue_url, dlq_url
|
||||
|
||||
|
||||
|
||||
@@ -25,19 +25,19 @@ Your task
|
||||
events ordered, return the message id.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import json
|
||||
|
||||
from mypy_boto3_sqs import SQSClient
|
||||
|
||||
|
||||
def create_fifo_queue(sqs: SQSClient, name: str) -> str:
|
||||
if (not name.endswith(".fifo")):
|
||||
raise ValueError
|
||||
return sqs.create_queue(QueueName=name, Attributes={"FifoQueue": "true", "ContentBasedDeduplication": "true"})["QueueUrl"] # TODO
|
||||
return sqs.create_queue(QueueName=name)["QueueUrl"] # TODO
|
||||
|
||||
|
||||
def publish_event(sqs: SQSClient, url: str, customer_id: str, event: dict) -> str:
|
||||
return sqs.send_message(QueueUrl=url, MessageBody=json.dumps(event, sort_keys=True), MessageGroupId=customer_id)["MessageId"] # TODO
|
||||
return sqs.send_message(QueueUrl=url, MessageBody=json.dumps(event))["MessageId"] # TODO
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -18,6 +18,8 @@ Your task
|
||||
original bytes, delete the message.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import json
|
||||
import uuid
|
||||
|
||||
@@ -28,27 +30,11 @@ MAX_INLINE_BYTES = 256 * 1024
|
||||
|
||||
|
||||
def send_payload(sqs: SQSClient, s3: S3Client, url: str, bucket: str, payload: bytes) -> None:
|
||||
if len(payload) <= MAX_INLINE_BYTES:
|
||||
sqs.send_message(QueueUrl=url, MessageBody=payload.decode("utf-8"))
|
||||
return
|
||||
key = f"payloads/{uuid.uuid4()}"
|
||||
s3.put_object(Bucket=bucket, Key=key, Body=payload)
|
||||
sqs.send_message(
|
||||
QueueUrl=url,
|
||||
MessageBody=json.dumps({"s3_bucket": bucket, "s3_key": key}),
|
||||
MessageAttributes={"claim-check": {"DataType": "String", "StringValue": "true"}},
|
||||
)
|
||||
sqs.send_message(QueueUrl=url, MessageBody=payload.decode("utf-8")) # TODO: too big for SQS sometimes
|
||||
|
||||
|
||||
def receive_payload(sqs: SQSClient, s3: S3Client, url: str) -> bytes:
|
||||
message = sqs.receive_message(QueueUrl=url, MaxNumberOfMessages=1, MessageAttributeNames=["All"])["Messages"][0]
|
||||
if message.get("MessageAttributes", {}).get("claim-check", {}).get("StringValue") == "true":
|
||||
pointer = json.loads(message["Body"])
|
||||
payload = s3.get_object(Bucket=pointer["s3_bucket"], Key=pointer["s3_key"])["Body"].read()
|
||||
else:
|
||||
payload = message["Body"].encode("utf-8")
|
||||
sqs.delete_message(QueueUrl=url, ReceiptHandle=message["ReceiptHandle"])
|
||||
return payload
|
||||
raise NotImplementedError # TODO
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -24,6 +24,8 @@ Your task
|
||||
* `decrypt_document(kms, envelope)` → original bytes.
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
import os
|
||||
|
||||
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
|
||||
@@ -32,15 +34,11 @@ from mypy_boto3_kms import KMSClient
|
||||
|
||||
def encrypt_document(kms: KMSClient, key_id: str, data: bytes) -> dict:
|
||||
# TODO: KMS Encrypt cannot take more than 4 KB, use a data key instead
|
||||
dataKey = kms.generate_data_key(KeyId=key_id, KeySpec="AES_256")
|
||||
nonce = os.urandom(12)
|
||||
ciphertext = AESGCM(dataKey["Plaintext"]).encrypt(nonce, data, None)
|
||||
return {"ciphertext": ciphertext, "nonce": nonce, "encrypted_key": dataKey["CiphertextBlob"]}
|
||||
return {"ciphertext": kms.encrypt(KeyId=key_id, Plaintext=data)["CiphertextBlob"]}
|
||||
|
||||
|
||||
def decrypt_document(kms: KMSClient, envelope: dict) -> bytes:
|
||||
datakey = kms.decrypt(CiphertextBlob=envelope["encrypted_key"])["Plaintext"]
|
||||
return AESGCM(datakey).decrypt(envelope["nonce"], envelope["ciphertext"], associated_data=None)
|
||||
raise NotImplementedError # TODO
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -16,36 +16,29 @@ ONE template, two environments:
|
||||
`AlertsTopicArn` (only in prod).
|
||||
"""
|
||||
|
||||
# I AM NOT DONE
|
||||
|
||||
TEMPLATE = """
|
||||
AWSTemplateFormatVersion: "2010-09-09"
|
||||
Parameters:
|
||||
Env:
|
||||
Type: String
|
||||
AllowedValues: [dev, prod]
|
||||
Mappings:
|
||||
EnvSettings:
|
||||
dev:
|
||||
Retention: 345600
|
||||
prod:
|
||||
Retention: 1209600
|
||||
Conditions:
|
||||
IsProd: !Equals [!Ref Env, prod]
|
||||
# TODO: Mappings (EnvSettings) and Conditions (IsProd)
|
||||
Resources:
|
||||
JobsQueue:
|
||||
Type: AWS::SQS::Queue
|
||||
Properties:
|
||||
QueueName: !Join ["-", [jobs, !Ref Env, !Ref "AWS::Region"]]
|
||||
MessageRetentionPeriod: !FindInMap [EnvSettings, !Ref Env, Retention]
|
||||
VisibilityTimeout: !If [IsProd, 300, 60]
|
||||
QueueName: jobs # TODO: jobs-<Env>-<region>
|
||||
MessageRetentionPeriod: 345600 # TODO: from the mapping
|
||||
VisibilityTimeout: 60 # TODO: 300 in prod
|
||||
AlertsTopic:
|
||||
Type: AWS::SNS::Topic
|
||||
Condition: IsProd
|
||||
Type: AWS::SNS::Topic # TODO: prod only
|
||||
Outputs:
|
||||
JobsQueueName:
|
||||
Value: !GetAtt JobsQueue.QueueName
|
||||
AlertsTopicArn:
|
||||
Condition: IsProd
|
||||
Value: !Ref AlertsTopic
|
||||
Value: !Ref AlertsTopic # TODO: prod only
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -20,34 +20,17 @@ Your task
|
||||
validation functions for BeforeAllowTraffic and AfterAllowTraffic.
|
||||
"""
|
||||
|
||||
EC2_IN_PLACE = ["ApplicationStop", "DownloadBundle", "BeforeInstall", "Install", "AfterInstall", "ApplicationStart", "ValidateService"]
|
||||
EC2_IN_PLACE_WITH_LB = (
|
||||
["BeforeBlockTraffic", "BlockTraffic", "AfterBlockTraffic"]
|
||||
+ EC2_IN_PLACE
|
||||
+ ["BeforeAllowTraffic", "AllowTraffic", "AfterAllowTraffic"]
|
||||
)
|
||||
ECS_BLUE_GREEN = [
|
||||
"BeforeInstall", "Install", "AfterInstall", "AllowTestTraffic", "AfterAllowTestTraffic",
|
||||
"BeforeAllowTraffic", "AllowTraffic", "AfterAllowTraffic",
|
||||
]
|
||||
LAMBDA = ["BeforeAllowTraffic", "AllowTraffic", "AfterAllowTraffic"]
|
||||
EC2_SCRIPTABLE = {
|
||||
"ApplicationStop", "BeforeInstall", "AfterInstall", "ApplicationStart", "ValidateService",
|
||||
"BeforeBlockTraffic", "AfterBlockTraffic", "BeforeAllowTraffic", "AfterAllowTraffic",
|
||||
}
|
||||
# I AM NOT DONE
|
||||
|
||||
EC2_IN_PLACE = ["DownloadBundle", "Install", "ApplicationStart"] # TODO: complete and order
|
||||
EC2_IN_PLACE_WITH_LB = [] # TODO
|
||||
ECS_BLUE_GREEN = [] # TODO
|
||||
LAMBDA = [] # TODO
|
||||
EC2_SCRIPTABLE = set() # TODO
|
||||
|
||||
|
||||
def lambda_appspec(function_name: str, alias: str, current: str, target: str, before_hook: str, after_hook: str) -> dict:
|
||||
return {
|
||||
"version": 0.0,
|
||||
"Resources": [
|
||||
{function_name: {
|
||||
"Type": "AWS::Lambda::Function",
|
||||
"Properties": {"Name": function_name, "Alias": alias, "CurrentVersion": current, "TargetVersion": target},
|
||||
}}
|
||||
],
|
||||
"Hooks": [{"BeforeAllowTraffic": before_hook}, {"AfterAllowTraffic": after_hook}],
|
||||
}
|
||||
raise NotImplementedError # TODO
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -1,397 +0,0 @@
|
||||
{"type": "answer", "ts": "2026-10-27T18:05:18+00:00", "session": "cdcca380", "mode": "quiz", "qid": "messaging-008", "topic": "messaging", "domain": 1, "given": ["D"], "correct": false, "seconds": 53}
|
||||
{"type": "answer", "ts": "2026-10-27T18:07:19+00:00", "session": "cdcca380", "mode": "quiz", "qid": "foundations-003", "topic": "foundations", "domain": 2, "given": ["C"], "correct": false, "seconds": 121}
|
||||
{"type": "answer", "ts": "2026-10-27T18:08:19+00:00", "session": "cdcca380", "mode": "quiz", "qid": "caching-005", "topic": "caching", "domain": 4, "given": ["D"], "correct": false, "seconds": 60}
|
||||
{"type": "answer", "ts": "2026-10-27T18:09:55+00:00", "session": "cdcca380", "mode": "quiz", "qid": "caching-003", "topic": "caching", "domain": 1, "given": ["A"], "correct": false, "seconds": 96}
|
||||
{"type": "answer", "ts": "2026-10-27T18:12:58+00:00", "session": "cdcca380", "mode": "quiz", "qid": "testing-018", "topic": "testing", "domain": 3, "given": ["C"], "correct": true, "seconds": 183}
|
||||
{"type": "answer", "ts": "2026-10-27T18:14:33+00:00", "session": "cdcca380", "mode": "quiz", "qid": "s3-004", "topic": "s3", "domain": 4, "given": ["C"], "correct": true, "seconds": 96}
|
||||
{"type": "answer", "ts": "2026-10-27T18:17:23+00:00", "session": "cdcca380", "mode": "quiz", "qid": "cognito-012", "topic": "cognito", "domain": 2, "given": ["D"], "correct": true, "seconds": 170}
|
||||
{"type": "answer", "ts": "2026-10-27T18:18:30+00:00", "session": "cdcca380", "mode": "quiz", "qid": "iam-001", "topic": "iam", "domain": 2, "given": ["D"], "correct": true, "seconds": 67}
|
||||
{"type": "answer", "ts": "2026-10-27T18:21:35+00:00", "session": "cdcca380", "mode": "quiz", "qid": "cognito-009", "topic": "cognito", "domain": 2, "given": ["A", "B", "C"], "correct": true, "seconds": 184}
|
||||
{"type": "answer", "ts": "2026-10-27T18:22:34+00:00", "session": "cdcca380", "mode": "quiz", "qid": "cloudformation-002", "topic": "cloudformation", "domain": 3, "given": ["D"], "correct": false, "seconds": 59}
|
||||
{"type": "answer", "ts": "2026-10-27T18:24:05+00:00", "session": "cdcca380", "mode": "quiz", "qid": "dynamodb-015", "topic": "dynamodb", "domain": 1, "given": ["A"], "correct": false, "seconds": 91}
|
||||
{"type": "answer", "ts": "2026-10-27T18:25:31+00:00", "session": "cdcca380", "mode": "quiz", "qid": "troubleshooting-005", "topic": "troubleshooting", "domain": 4, "given": ["B"], "correct": true, "seconds": 86}
|
||||
{"type": "answer", "ts": "2026-10-27T18:26:17+00:00", "session": "cdcca380", "mode": "quiz", "qid": "monitoring-009", "topic": "monitoring", "domain": 4, "given": ["D"], "correct": true, "seconds": 47}
|
||||
{"type": "answer", "ts": "2026-10-27T18:26:52+00:00", "session": "cdcca380", "mode": "quiz", "qid": "monitoring-006", "topic": "monitoring", "domain": 4, "given": ["A"], "correct": true, "seconds": 35}
|
||||
{"type": "answer", "ts": "2026-10-27T18:28:03+00:00", "session": "cdcca380", "mode": "quiz", "qid": "dynamodb-016", "topic": "dynamodb", "domain": 4, "given": ["C"], "correct": true, "seconds": 71}
|
||||
{"type": "answer", "ts": "2026-10-27T18:29:17+00:00", "session": "cdcca380", "mode": "quiz", "qid": "caching-012", "topic": "caching", "domain": 1, "given": ["D"], "correct": true, "seconds": 74}
|
||||
{"type": "answer", "ts": "2026-10-27T18:29:56+00:00", "session": "cdcca380", "mode": "quiz", "qid": "cognito-003", "topic": "cognito", "domain": 2, "given": ["A"], "correct": true, "seconds": 39}
|
||||
{"type": "answer", "ts": "2026-10-27T18:31:31+00:00", "session": "cdcca380", "mode": "quiz", "qid": "secrets-013", "topic": "secrets", "domain": 3, "given": ["A"], "correct": true, "seconds": 95}
|
||||
{"type": "answer", "ts": "2026-10-27T18:32:01+00:00", "session": "cdcca380", "mode": "quiz", "qid": "lambda-003", "topic": "lambda", "domain": 4, "given": ["A"], "correct": true, "seconds": 30}
|
||||
{"type": "answer", "ts": "2026-10-27T18:33:07+00:00", "session": "cdcca380", "mode": "quiz", "qid": "dynamodb-023", "topic": "dynamodb", "domain": 1, "given": ["A"], "correct": true, "seconds": 66}
|
||||
{"type": "summary", "ts": "2026-10-27T18:33:07+00:00", "session": "cdcca380", "mode": "quiz", "n": 20, "score": 0.7, "by_domain": {"1": [2, 5], "2": [4, 5], "3": [2, 3], "4": [6, 7]}, "by_topic": {"caching": [1, 3], "cloudformation": [0, 1], "cognito": [3, 3], "dynamodb": [2, 3], "foundations": [0, 1], "iam": [1, 1], "lambda": [1, 1], "messaging": [0, 1], "monitoring": [2, 2], "s3": [1, 1], "secrets": [1, 1], "testing": [1, 1], "troubleshooting": [1, 1]}, "minutes": null}
|
||||
{"type": "answer", "ts": "2026-10-28T18:44:23+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "caching", "domain": 1, "given": null, "correct": true, "note": "Stateless sessions: externalize state to ElastiCache, not sticky sessions"}
|
||||
{"type": "answer", "ts": "2026-10-28T18:44:54+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "dynamodb", "domain": 1, "given": null, "correct": true, "note": "Unknown/spiky traffic + no capacity management -> on-demand"}
|
||||
{"type": "answer", "ts": "2026-10-28T18:45:38+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "messaging", "domain": 1, "given": null, "correct": true, "note": "Fan-out with independent durable copies: SNS -> one SQS queue per service"}
|
||||
{"type": "answer", "ts": "2026-10-28T18:47:04+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "cloudformation", "domain": 3, "given": null, "correct": false, "note": "Again chose a stack policy to protect data at stack deletion -> stack policies only guard stack updates; DeletionPolicy: Snapshot (RDS) / Retain"}
|
||||
{"type": "answer", "ts": "2026-10-28T18:56:38+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "foundations", "domain": 2, "given": null, "correct": true, "note": "SSRF on instance credentials -> require IMDSv2 (session token)"}
|
||||
{"type": "answer", "ts": "2026-10-28T21:24:56+00:00", "session": "tutor", "mode": "tutor", "qid": "foundations-001", "topic": "foundations", "domain": 1, "given": ["D"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-10-28T21:26:07+00:00", "session": "tutor", "mode": "tutor", "qid": "foundations-006", "topic": "foundations", "domain": 4, "given": ["B"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-10-28T21:27:29+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "foundations", "domain": 1, "given": null, "correct": false, "note": "Shared file storage across AZs + Lambda -> EFS; chose EBS Multi-Attach (one AZ only, Lambda can't mount EBS)"}
|
||||
{"type": "answer", "ts": "2026-10-28T21:29:32+00:00", "session": "tutor", "mode": "tutor", "qid": "foundations-004", "topic": "foundations", "domain": 2, "given": ["D"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-10-28T21:35:20+00:00", "session": "tutor", "mode": "tutor", "qid": "foundations-007", "topic": "foundations", "domain": 2, "given": ["B", "E"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-10-28T21:36:36+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "foundations", "domain": 1, "given": null, "correct": false, "note": "Lambda in VPC -> SQS without internet: interface endpoint; chose a gateway endpoint (gateway endpoints = S3 and DynamoDB only)"}
|
||||
{"type": "answer", "ts": "2026-10-28T21:38:21+00:00", "session": "tutor", "mode": "tutor", "qid": "foundations-010", "topic": "foundations", "domain": 4, "given": ["D"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-10-28T21:39:34+00:00", "session": "tutor", "mode": "tutor", "qid": "foundations-011", "topic": "foundations", "domain": 1, "given": ["B"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-10-28T21:41:45+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "foundations", "domain": 4, "given": null, "correct": false, "note": "Lambda VPC config fails on CreateNetworkInterface -> AWSLambdaVPCAccessExecutionRole on the execution role; chose granting EC2 permission to the developer's IAM user (wrong principal)"}
|
||||
{"type": "answer", "ts": "2026-10-28T21:42:44+00:00", "session": "tutor", "mode": "tutor", "qid": "foundations-002", "topic": "foundations", "domain": 1, "given": ["B"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-10-29T22:02:40+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "cloudformation", "domain": 3, "given": null, "correct": false, "note": "warm-up: chose UpdateReplacePolicy Retain to keep RDS data on stack deletion; DeletionPolicy Snapshot (3rd miss on deletion protection)"}
|
||||
{"type": "answer", "ts": "2026-10-29T22:05:31+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "foundations", "domain": 1, "given": null, "correct": false, "note": "warm-up: chose gateway VPC endpoint for SQS again; gateway = S3 and DynamoDB only, SQS = interface endpoint (2nd miss)"}
|
||||
{"type": "answer", "ts": "2026-10-29T22:07:15+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "foundations", "domain": 2, "given": null, "correct": true, "note": "warm-up: SG references SG (db-sg inbound from app-sg) instead of CIDR/NACL"}
|
||||
{"type": "answer", "ts": "2026-10-29T22:09:04+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "foundations", "domain": 1, "given": null, "correct": true, "note": "warm-up: shared files across AZs + Lambda = EFS (not EBS Multi-Attach)"}
|
||||
{"type": "answer", "ts": "2026-10-29T22:09:58+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": false, "note": "warm-up: gave ec2:CreateNetworkInterface to the developer's IAM user again; Lambda creates VPC ENIs with its execution role (2nd miss)"}
|
||||
{"type": "answer", "ts": "2026-10-29T22:39:20+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": false, "note": "dynamodb:LeadingKeys on a GSI = the index's partition key value (status), not the caller's customer_id; Query denied"}
|
||||
{"type": "answer", "ts": "2026-10-31T19:30:31+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "cloudformation", "domain": 3, "given": null, "correct": false, "note": "warm-up: chose a stack policy (deny Update:Delete) to keep a DynamoDB table when the stack is deleted (4th miss); stack policies only guard updates, use DeletionPolicy: Retain"}
|
||||
{"type": "answer", "ts": "2026-10-31T19:34:56+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "foundations", "domain": 1, "given": null, "correct": false, "note": "warm-up: chose gateway endpoints for SQS + DynamoDB (C right, A wrong); SQS = interface endpoint, gateway = S3 and DynamoDB only (3rd miss)"}
|
||||
{"type": "answer", "ts": "2026-10-31T19:39:13+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": true, "note": "warm-up: Lambda VPC ENIs are created by the execution role -> AWSLambdaVPCAccessExecutionRole on the role, not the IAM user"}
|
||||
{"type": "answer", "ts": "2026-10-31T19:41:45+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": false, "note": "warm-up: thought LeadingKeys filters GSI query results to the caller's tenant; IAM never filters, it allows or denies the request; LeadingKeys = the index partition key value (due_date) -> denied (2nd miss)"}
|
||||
{"type": "answer", "ts": "2026-10-31T19:45:24+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "caching", "domain": 4, "given": null, "correct": true, "note": "warm-up: Lambda -> Aurora too many connections = RDS Proxy (pools and multiplexes), not replicas"}
|
||||
{"type": "answer", "ts": "2026-10-31T22:14:52+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "kms", "domain": 2, "given": null, "correct": false, "note": "iam_4 check: chose kms:GenerateDataKey for GetObject on SSE-KMS objects; reading needs kms:Decrypt (GenerateDataKey = writes)"}
|
||||
{"type": "answer", "ts": "2026-10-31T22:29:36+00:00", "session": "tutor", "mode": "tutor", "qid": "iam-003", "topic": "iam", "domain": 2, "given": ["A"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-10-31T22:30:45+00:00", "session": "tutor", "mode": "tutor", "qid": "iam-011", "topic": "iam", "domain": 2, "given": ["B"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-10-31T22:31:47+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": true, "note": "quiz: ListBucket is bucket-level -> Resource = bucket ARN + s3:prefix condition (not bucket/prefix/*)"}
|
||||
{"type": "answer", "ts": "2026-10-31T22:33:26+00:00", "session": "tutor", "mode": "tutor", "qid": "iam-002", "topic": "iam", "domain": 2, "given": ["D", "E"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-10-31T22:34:55+00:00", "session": "tutor", "mode": "tutor", "qid": "iam-012", "topic": "iam", "domain": 4, "given": ["A"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-10-31T22:36:57+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": true, "note": "quiz: Deny + StringNotEquals with a missing condition key -> condition true -> denied, even with default SSE-KMS"}
|
||||
{"type": "answer", "ts": "2026-10-31T22:37:58+00:00", "session": "tutor", "mode": "tutor", "qid": "iam-016", "topic": "iam", "domain": 2, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-10-31T22:38:41+00:00", "session": "tutor", "mode": "tutor", "qid": "iam-007", "topic": "iam", "domain": 2, "given": ["B"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-10-31T22:40:02+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": false, "note": "quiz: thought Principal arn:...:root = only the root user; it means the whole account (delegation), and cross-account still needs account B's identity policy to allow it"}
|
||||
{"type": "answer", "ts": "2026-10-31T22:42:11+00:00", "session": "tutor", "mode": "tutor", "qid": "iam-014", "topic": "iam", "domain": 2, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-10-31T23:46:18+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "sdk", "domain": 2, "given": null, "correct": true, "note": "sdk_1 check: get-caller-identity shows an IAM user on EC2 with no ~/.aws -> stale env var keys win over the instance profile; remove them"}
|
||||
{"type": "answer", "ts": "2026-11-02T09:43:19+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "cloudformation", "domain": 3, "given": null, "correct": true, "note": "Warm-up 2 Nov: DeletionPolicy Snapshot to keep an EBS backup when the stack is deleted (first correct after 4 misses)"}
|
||||
{"type": "answer", "ts": "2026-11-02T09:48:41+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "foundations", "domain": 1, "given": null, "correct": false, "note": "Warm-up 2 Nov: chose gateway endpoint for Secrets Manager and interface for S3, reversed. Gateway = S3 and DynamoDB only (4th miss)"}
|
||||
{"type": "answer", "ts": "2026-11-02T09:50:05+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": true, "note": "Warm-up 2 Nov: LeadingKeys on a GSI compares the index partition key with the tag, denied, no filtering (first correct after 2 misses)"}
|
||||
{"type": "answer", "ts": "2026-11-02T09:51:53+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": true, "note": "Warm-up 2 Nov: iam:PassRole on the role in the caller's identity policy to launch EC2 with an instance profile"}
|
||||
{"type": "answer", "ts": "2026-11-02T09:53:29+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": true, "note": "Warm-up 2 Nov: cross-account SQS without role assumption = identity policy in A + queue policy in B"}
|
||||
{"type": "answer", "ts": "2026-11-02T09:54:55+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "foundations", "domain": 1, "given": null, "correct": true, "note": "Retest 2 Nov, same session: gateway for DynamoDB + interface for SQS"}
|
||||
{"type": "answer", "ts": "2026-11-02T11:11:33+00:00", "session": "tutor", "mode": "tutor", "qid": "sdk-007", "topic": "sdk", "domain": 2, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-02T11:11:58+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "sdk", "domain": 1, "given": null, "correct": true, "note": "CLI timeout on a big list: --page-size keeps all results with smaller calls, --max-items truncates"}
|
||||
{"type": "answer", "ts": "2026-11-02T11:16:03+00:00", "session": "tutor", "mode": "tutor", "qid": "sdk-008", "topic": "sdk", "domain": 4, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-02T11:17:00+00:00", "session": "tutor", "mode": "tutor", "qid": "sdk-010", "topic": "sdk", "domain": 2, "given": ["B"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-02T11:17:32+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "sdk", "domain": 1, "given": null, "correct": true, "note": "Workers retrying in lockstep after an outage: add jitter to exponential backoff (thundering herd)"}
|
||||
{"type": "answer", "ts": "2026-11-02T11:19:01+00:00", "session": "tutor", "mode": "tutor", "qid": "sdk-012", "topic": "sdk", "domain": 2, "given": ["B"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-02T11:19:27+00:00", "session": "tutor", "mode": "tutor", "qid": "sdk-009", "topic": "sdk", "domain": 1, "given": ["D"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-02T11:19:56+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": true, "note": "Review 2 Nov: aws sts get-caller-identity shows the identity in use and needs no permission (missed 31 Oct as iam-012)"}
|
||||
{"type": "answer", "ts": "2026-11-02T11:20:26+00:00", "session": "tutor", "mode": "tutor", "qid": "sdk-013", "topic": "sdk", "domain": 1, "given": ["D"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-02T11:21:06+00:00", "session": "tutor", "mode": "tutor", "qid": "sdk-014", "topic": "sdk", "domain": 1, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-04T09:22:29+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "foundations", "domain": 1, "given": null, "correct": true, "note": "Warm-up 4 Nov: EC2 private subnets to DynamoDB + KMS, most cost-effective: gateway for DynamoDB, interface for KMS"}
|
||||
{"type": "answer", "ts": "2026-11-04T09:24:20+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "kms", "domain": 2, "given": null, "correct": false, "note": "Warm-up 4 Nov: multipart upload to SSE-KMS needs kms:Decrypt as well as GenerateDataKey; chose kms:CreateGrant"}
|
||||
{"type": "answer", "ts": "2026-11-04T09:26:27+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "dynamodb", "domain": 1, "given": null, "correct": true, "note": "Warm-up 4 Nov: unpredictable spiky traffic, no capacity planning -> on-demand"}
|
||||
{"type": "answer", "ts": "2026-11-04T09:33:49+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "messaging", "domain": 1, "given": null, "correct": true, "note": "Warm-up 4 Nov: every service processes every order, offline for hours, catch up -> SNS topic + one SQS queue per service"}
|
||||
{"type": "answer", "ts": "2026-11-04T09:36:10+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "foundations", "domain": 2, "given": null, "correct": true, "note": "Warm-up 4 Nov: SSRF steals instance role credentials -> require IMDSv2 session tokens"}
|
||||
{"type": "answer", "ts": "2026-11-04T18:27:41+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "s3", "domain": 1, "given": null, "correct": false, "note": "s3_1 check: update x-amz-meta-* in place -> CopyObject onto same key with MetadataDirective=REPLACE; chose CreateBucketMetadataConfiguration"}
|
||||
{"type": "answer", "ts": "2026-11-04T18:30:01+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "s3", "domain": 1, "given": null, "correct": true, "note": "Check yourself: 2 GB direct mobile uploads -> presigned URL + multipart upload"}
|
||||
{"type": "answer", "ts": "2026-11-04T18:31:42+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "s3", "domain": 2, "given": null, "correct": true, "note": "Check yourself: force SSE-KMS -> Deny bucket policy on the encryption header, or SSE-KMS default bucket encryption"}
|
||||
{"type": "answer", "ts": "2026-11-04T18:33:03+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "s3", "domain": 2, "given": null, "correct": true, "note": "Check yourself: presigned URL signed by a Lambda role dies when the temporary credentials expire, before ExpiresIn"}
|
||||
{"type": "answer", "ts": "2026-11-04T18:33:47+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "s3", "domain": 1, "given": null, "correct": true, "note": "Check yourself: CORS error on PUT -> bucket CORS configuration (location right, rule contents not stated)"}
|
||||
{"type": "answer", "ts": "2026-11-04T18:34:25+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "s3", "domain": 1, "given": null, "correct": true, "note": "Check yourself: read twice a year, millisecond access -> Glacier Instant Retrieval or Standard-IA"}
|
||||
{"type": "answer", "ts": "2026-11-07T13:46:23+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "kms", "domain": 2, "given": null, "correct": false, "note": "Warm-up: SSE-KMS multipart fails, small PUT ok -> kms:Decrypt (chose kms:ReEncryptFrom; 2nd miss after CreateGrant)"}
|
||||
{"type": "answer", "ts": "2026-11-07T13:47:09+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "s3", "domain": 1, "given": null, "correct": true, "note": "Warm-up: fix Content-Type in place -> CopyObject same key, MetadataDirective=REPLACE, resend user Metadata"}
|
||||
{"type": "answer", "ts": "2026-11-07T13:48:18+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "cloudformation", "domain": 3, "given": null, "correct": false, "note": "Warm-up: final DB backup when the stack is deleted -> DeletionPolicy: Snapshot (chose UpdateReplacePolicy: Snapshot, 2nd time)"}
|
||||
{"type": "answer", "ts": "2026-11-07T13:50:19+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": false, "note": "Warm-up: Lambda VPC ENI error names the execution role -> AWSLambdaVPCAccessExecutionRole on it (chose ec2 action in the function's resource-based policy)"}
|
||||
{"type": "answer", "ts": "2026-11-07T13:52:27+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "foundations", "domain": 1, "given": null, "correct": true, "note": "Warm-up: DB SG inbound 5432 from app-sg (SG referencing SG) for ASG instances"}
|
||||
{"type": "answer", "ts": "2026-11-07T13:53:27+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "kms", "domain": 2, "given": null, "correct": false, "note": "Retest: SSE-KMS multipart -> GenerateDataKey + Decrypt (chose GenerateDataKey + Encrypt; 3rd miss)"}
|
||||
{"type": "answer", "ts": "2026-11-07T14:18:07+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "s3", "domain": 1, "given": null, "correct": false, "note": "s3_5 check: versioned bucket, Expiration only adds delete markers, old data stays noncurrent -> NoncurrentVersionExpiration (chose suspend versioning)"}
|
||||
{"type": "answer", "ts": "2026-11-08T19:48:04+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "kms", "domain": 2, "given": null, "correct": false, "note": "Warm-up 8 Nov: SSE-KMS multipart upload role needs kms:GenerateDataKey + kms:Decrypt (chose Decrypt + CreateGrant; Decrypt now right, GenerateDataKey dropped)"}
|
||||
{"type": "answer", "ts": "2026-11-08T19:51:15+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "cloudformation", "domain": 3, "given": null, "correct": true, "note": "Warm-up 8 Nov: keep a DynamoDB table when the stack is deleted -> DeletionPolicy: Retain (rejected UpdateReplacePolicy, stack policy, termination protection)"}
|
||||
{"type": "answer", "ts": "2026-11-08T19:53:49+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": true, "note": "Warm-up 8 Nov: Lambda VPC ENI error names the execution role -> AWSLambdaVPCAccessExecutionRole on it (rejected IAM user, resource-based policy, EC2 endpoint)"}
|
||||
{"type": "answer", "ts": "2026-11-08T19:55:05+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "s3", "domain": 1, "given": null, "correct": true, "note": "Warm-up 8 Nov: versioned bucket, Expiration leaves noncurrent versions billed -> NoncurrentVersionExpiration (rejected suspend versioning, ExpiredObjectDeleteMarker)"}
|
||||
{"type": "answer", "ts": "2026-11-08T19:57:04+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "caching", "domain": 1, "given": null, "correct": true, "note": "Warm-up 8 Nov: many Lambda invocations exhaust Aurora connections -> RDS Proxy (rejected reader replicas, more memory, per-invocation connections)"}
|
||||
{"type": "answer", "ts": "2026-11-10T11:31:28+00:00", "session": "tutor", "mode": "tutor", "qid": "s3-014", "topic": "s3", "domain": 4, "given": ["D"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-10T11:33:29+00:00", "session": "tutor", "mode": "tutor", "qid": "lambda-005", "topic": "lambda", "domain": 4, "given": ["A"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-11-10T11:34:33+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "kms", "domain": 2, "given": null, "correct": false, "note": "Quiz 10 Nov: SSE-KMS multipart upload needs kms:GenerateDataKey + kms:Decrypt; answered Encrypt + GenerateDataKey (6th miss)"}
|
||||
{"type": "answer", "ts": "2026-11-10T12:04:50+00:00", "session": "tutor", "mode": "tutor", "qid": "s3-008", "topic": "s3", "domain": 4, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-10T12:06:48+00:00", "session": "tutor", "mode": "tutor", "qid": "lambda-012", "topic": "lambda", "domain": 4, "given": ["B"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-10T12:07:48+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "foundations", "domain": 1, "given": null, "correct": true, "note": "Quiz 10 Nov: private Lambda to SQS + DynamoDB, most cost-effective -> interface endpoint for SQS, gateway endpoint for DynamoDB"}
|
||||
{"type": "answer", "ts": "2026-11-10T12:12:23+00:00", "session": "tutor", "mode": "tutor", "qid": "s3-002", "topic": "s3", "domain": 4, "given": ["C"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-10T12:15:14+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": false, "note": "Quiz 10 Nov: LeadingKeys on a GSI query compares the index partition key value (OVERDUE) with the tag -> denied; answered 'condition applies only to the base table'"}
|
||||
{"type": "answer", "ts": "2026-11-10T12:16:28+00:00", "session": "tutor", "mode": "tutor", "qid": "lambda-013", "topic": "lambda", "domain": 4, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-10T12:18:05+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": true, "note": "Quiz 10 Nov: ec2:RunInstances with an instance profile fails on iam:PassRole -> allow iam:PassRole on the role in the caller's identity policy"}
|
||||
{"type": "answer", "ts": "2026-11-16T17:39:38+00:00", "session": "tutor-2026-11-16-end-quiz", "mode": "tutor", "qid": "messaging-009", "topic": "messaging", "domain": 4, "given": ["D"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-16T17:39:38+00:00", "session": "tutor-2026-11-16-end-quiz", "mode": "tutor", "qid": "messaging-020", "topic": "messaging", "domain": 1, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-16T17:39:38+00:00", "session": "tutor-2026-11-16-end-quiz", "mode": "tutor", "qid": "messaging-004", "topic": "messaging", "domain": 4, "given": ["A"], "correct": true, "note": "Learner answered A or C; A counted as tentative first choice. Long polling vs delivery delay needs reinforcement."}
|
||||
{"type": "answer", "ts": "2026-11-16T17:39:38+00:00", "session": "tutor-2026-11-16-end-quiz", "mode": "tutor", "qid": "messaging-007", "topic": "messaging", "domain": 1, "given": ["C"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-16T17:39:38+00:00", "session": "tutor-2026-11-16-end-quiz", "mode": "tutor", "qid": "dynamodb-019", "topic": "dynamodb", "domain": 4, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-16T17:39:38+00:00", "session": "tutor-2026-11-16-end-quiz", "mode": "tutor", "qid": "caching-008", "topic": "caching", "domain": 4, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-16T17:39:38+00:00", "session": "tutor-2026-11-16-end-quiz", "mode": "tutor", "qid": "caching-004", "topic": "caching", "domain": 1, "given": ["D"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-16T17:39:38+00:00", "session": "tutor-2026-11-16-end-quiz", "mode": "tutor", "qid": "apigw-008", "topic": "apigw", "domain": 2, "given": ["A", "B"], "correct": false, "note": "Learner considered B or A, without a final choice. Neither is correct; answer C: Cognito user pool authorizer."}
|
||||
{"type": "answer", "ts": "2026-11-16T17:39:38+00:00", "session": "tutor-2026-11-16-end-quiz", "mode": "tutor", "qid": null, "topic": "kms", "domain": 2, "given": ["B", "D"], "correct": true, "note": "SSE-KMS multipart: GenerateDataKey and Decrypt; correct."}
|
||||
{"type": "answer", "ts": "2026-11-16T17:39:38+00:00", "session": "tutor-2026-11-16-end-quiz", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": ["C"], "correct": true, "note": "LeadingKeys on GSI compares index partition key with tenant tag; correct."}
|
||||
{"type": "answer", "ts": "2026-11-16T17:39:38+00:00", "session": "tutor-2026-11-16-end-quiz", "mode": "tutor", "qid": null, "topic": "lambda", "domain": 4, "given": ["B"], "correct": true, "note": "Synchronous throttling returns 429 TooManyRequestsException; correct."}
|
||||
{"type": "answer", "ts": "2026-11-16T17:39:38+00:00", "session": "tutor-2026-11-16-end-quiz", "mode": "tutor", "qid": null, "topic": "cloudformation", "domain": 3, "given": ["D"], "correct": true, "note": "DeletionPolicy Snapshot for final RDS snapshot on stack deletion; correct."}
|
||||
{"type": "answer", "ts": "2026-11-21T12:55:34+00:00", "session": "tutor-2026-11-21-end-quiz", "mode": "tutor", "qid": "streaming-002", "topic": "streaming", "domain": 4, "given": ["D"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-21T12:55:34+00:00", "session": "tutor-2026-11-21-end-quiz", "mode": "tutor", "qid": "streaming-008", "topic": "streaming", "domain": 1, "given": ["A"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-11-21T12:55:35+00:00", "session": "tutor-2026-11-21-end-quiz", "mode": "tutor", "qid": "patterns-010", "topic": "patterns", "domain": 1, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-21T12:55:35+00:00", "session": "tutor-2026-11-21-end-quiz", "mode": "tutor", "qid": "cognito-014", "topic": "cognito", "domain": 2, "given": ["C"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-11-21T12:55:35+00:00", "session": "tutor-2026-11-21-end-quiz", "mode": "tutor", "qid": "cognito-006", "topic": "cognito", "domain": 2, "given": ["C"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-11-21T12:55:36+00:00", "session": "tutor-2026-11-21-end-quiz", "mode": "tutor", "qid": "kms-005", "topic": "kms", "domain": 2, "given": ["B"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-21T12:55:36+00:00", "session": "tutor-2026-11-21-end-quiz", "mode": "tutor", "qid": "kms-013", "topic": "kms", "domain": 2, "given": ["B"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-11-21T12:55:36+00:00", "session": "tutor-2026-11-21-end-quiz", "mode": "tutor", "qid": "secrets-016", "topic": "secrets", "domain": 2, "given": ["D"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-11-21T12:55:37+00:00", "session": "tutor-2026-11-21-end-quiz", "mode": "tutor", "qid": "secrets-005", "topic": "secrets", "domain": 3, "given": ["D"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-21T12:55:37+00:00", "session": "tutor-2026-11-21-end-quiz", "mode": "tutor", "qid": null, "topic": "apigw", "domain": 2, "given": null, "correct": false, "note": "Cognito user pool token, no code -> Cognito user pool authorizer; chose resource policy (B) again, 2nd miss"}
|
||||
{"type": "answer", "ts": "2026-11-21T12:55:37+00:00", "session": "tutor-2026-11-21-end-quiz", "mode": "tutor", "qid": null, "topic": "messaging", "domain": 4, "given": null, "correct": true, "note": "Empty receives -> long polling ReceiveMessageWaitTimeSeconds; correct"}
|
||||
{"type": "answer", "ts": "2026-11-21T12:55:38+00:00", "session": "tutor-2026-11-21-end-quiz", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": false, "note": "Cross-account without AssumeRole needs execution role identity policy + bucket policy; chose resource-based policy on the function (D)"}
|
||||
{"type": "answer", "ts": "2026-11-22T16:14:45+00:00", "session": "tutor", "mode": "tutor", "qid": "cloudformation-005", "topic": "cloudformation", "domain": 4, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-22T16:14:45+00:00", "session": "tutor", "mode": "tutor", "qid": "cloudformation-017", "topic": "cloudformation", "domain": 3, "given": ["C"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-22T16:14:46+00:00", "session": "tutor", "mode": "tutor", "qid": "sam-006", "topic": "sam", "domain": 3, "given": ["D"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-11-22T16:14:46+00:00", "session": "tutor", "mode": "tutor", "qid": "cicd-019", "topic": "cicd", "domain": 3, "given": ["D"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-22T16:14:47+00:00", "session": "tutor", "mode": "tutor", "qid": "cloudformation-007", "topic": "cloudformation", "domain": 4, "given": ["B"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-22T16:14:47+00:00", "session": "tutor", "mode": "tutor", "qid": "cicd-002", "topic": "cicd", "domain": 4, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-22T16:14:48+00:00", "session": "tutor", "mode": "tutor", "qid": "sam-011", "topic": "sam", "domain": 3, "given": ["A"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-11-22T16:14:48+00:00", "session": "tutor", "mode": "tutor", "qid": "cicd-013", "topic": "cicd", "domain": 2, "given": ["C"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-22T16:14:48+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "apigw", "domain": 2, "given": null, "correct": true, "note": "Cognito user pool authorizer for user pool tokens, no custom code"}
|
||||
{"type": "answer", "ts": "2026-11-22T16:14:49+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "cognito", "domain": 2, "given": null, "correct": true, "note": "Identity pool guest access: unauthenticated + authenticated roles"}
|
||||
{"type": "answer", "ts": "2026-11-22T16:14:49+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": true, "note": "Cross-account without role assumption: identity policy on caller + bucket policy"}
|
||||
{"type": "answer", "ts": "2026-11-22T16:14:50+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "kms", "domain": 2, "given": null, "correct": true, "note": "kms:ViaService restricts key use to DynamoDB"}
|
||||
{"type": "answer", "ts": "2026-11-23T23:07:54+00:00", "session": "tutor", "mode": "tutor", "qid": "monitoring-001", "topic": "monitoring", "domain": 4, "given": ["D"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-23T23:07:54+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "secrets", "domain": 2, "given": null, "correct": true, "note": "Rotation connection failures -> alternating users strategy"}
|
||||
{"type": "answer", "ts": "2026-11-23T23:07:54+00:00", "session": "tutor", "mode": "tutor", "qid": "xray-002", "topic": "xray", "domain": 4, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-23T23:07:55+00:00", "session": "tutor", "mode": "tutor", "qid": "monitoring-015", "topic": "monitoring", "domain": 4, "given": ["C"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-23T23:07:55+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "streaming", "domain": 1, "given": null, "correct": true, "note": "50k events/s, <2 s, idempotent -> Express workflow"}
|
||||
{"type": "answer", "ts": "2026-11-23T23:07:55+00:00", "session": "tutor", "mode": "tutor", "qid": "xray-003", "topic": "xray", "domain": 4, "given": ["B", "D"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-23T23:07:56+00:00", "session": "tutor", "mode": "tutor", "qid": "xray-010", "topic": "xray", "domain": 4, "given": ["B"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-23T23:07:56+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "sam", "domain": 3, "given": null, "correct": true, "note": "PreTraffic hook reports via PutLifecycleEventHookExecutionStatus"}
|
||||
{"type": "answer", "ts": "2026-11-23T23:07:56+00:00", "session": "tutor", "mode": "tutor", "qid": "monitoring-005", "topic": "monitoring", "domain": 4, "given": ["C"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-23T23:07:57+00:00", "session": "tutor", "mode": "tutor", "qid": "xray-005", "topic": "xray", "domain": 4, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-23T23:07:57+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "sam", "domain": 3, "given": null, "correct": false, "note": "Per-branch SPA deploys + PR previews, LEAST effort -> Amplify Hosting (chose S3 + CodePipeline per branch again)"}
|
||||
{"type": "answer", "ts": "2026-11-24T20:38:10+00:00", "session": "tutor", "mode": "tutor", "qid": "containers-016", "topic": "containers", "domain": 3, "given": ["A"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-11-24T20:38:10+00:00", "session": "tutor", "mode": "tutor", "qid": "testing-014", "topic": "testing", "domain": 3, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-24T20:38:11+00:00", "session": "tutor", "mode": "tutor", "qid": "troubleshooting-009", "topic": "troubleshooting", "domain": 4, "given": ["C"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-24T20:38:11+00:00", "session": "tutor", "mode": "tutor", "qid": "cloudformation-018", "topic": "cloudformation", "domain": 3, "given": ["A"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-11-24T20:38:11+00:00", "session": "tutor", "mode": "tutor", "qid": "containers-011", "topic": "containers", "domain": 4, "given": ["C"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-24T20:38:12+00:00", "session": "tutor", "mode": "tutor", "qid": "testing-012", "topic": "testing", "domain": 3, "given": ["B"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-11-24T20:38:12+00:00", "session": "tutor", "mode": "tutor", "qid": "sam-009", "topic": "sam", "domain": 3, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-24T20:38:12+00:00", "session": "tutor", "mode": "tutor", "qid": "troubleshooting-004", "topic": "troubleshooting", "domain": 4, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-24T20:38:13+00:00", "session": "tutor", "mode": "tutor", "qid": "iam-017", "topic": "iam", "domain": 2, "given": ["B"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-11-24T20:38:13+00:00", "session": "tutor", "mode": "tutor", "qid": "containers-012", "topic": "containers", "domain": 3, "given": ["A"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-11-24T20:38:13+00:00", "session": "tutor", "mode": "tutor", "qid": "testing-006", "topic": "testing", "domain": 3, "given": ["A"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-11-24T20:38:14+00:00", "session": "tutor", "mode": "tutor", "qid": "apigw-011", "topic": "apigw", "domain": 1, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-24T20:38:14+00:00", "session": "tutor", "mode": "tutor", "qid": "kms-016", "topic": "kms", "domain": 2, "given": ["B"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-24T20:38:14+00:00", "session": "tutor", "mode": "tutor", "qid": "troubleshooting-014", "topic": "troubleshooting", "domain": 4, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-24T20:38:15+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "kms", "domain": 2, "given": null, "correct": true, "note": "SSE-KMS multipart upload: GenerateDataKey + Decrypt"}
|
||||
{"type": "answer", "ts": "2026-11-24T20:38:15+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "sam", "domain": 3, "given": null, "correct": true, "note": "Per-branch SPA deploys with PR previews: Amplify Hosting"}
|
||||
{"type": "answer", "ts": "2026-11-24T20:38:15+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": true, "note": "LeadingKeys on a GSI = index partition key value"}
|
||||
{"type": "answer", "ts": "2026-11-24T20:38:15+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "lambda", "domain": 1, "given": null, "correct": false, "note": "Async (S3) throttling: Lambda queues and retries up to 6 h"}
|
||||
{"type": "answer", "ts": "2026-11-24T20:38:16+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "cognito", "domain": 2, "given": null, "correct": true, "note": "Public client: authorization code + PKCE, no secret"}
|
||||
{"type": "answer", "ts": "2026-11-24T20:38:16+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": true, "note": "Cross-account SQS: execution role + queue policy"}
|
||||
{"type": "answer", "ts": "2026-11-26T10:33:46+00:00", "session": "tutor", "mode": "tutor", "qid": "optimization-001", "topic": "optimization", "domain": 4, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-26T10:33:46+00:00", "session": "tutor", "mode": "tutor", "qid": "optimization-006", "topic": "optimization", "domain": 4, "given": ["C"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-26T10:33:46+00:00", "session": "tutor", "mode": "tutor", "qid": "optimization-007", "topic": "optimization", "domain": 4, "given": ["D"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-26T10:33:47+00:00", "session": "tutor", "mode": "tutor", "qid": "troubleshooting-001", "topic": "troubleshooting", "domain": 4, "given": ["C"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-26T10:33:47+00:00", "session": "tutor", "mode": "tutor", "qid": "troubleshooting-008", "topic": "troubleshooting", "domain": 4, "given": ["A", "B"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-26T10:33:47+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "containers", "domain": 3, "given": null, "correct": true, "note": "Beanstalk traffic splitting: % of real traffic + eval period + auto rollback (ALB)"}
|
||||
{"type": "answer", "ts": "2026-11-26T10:33:47+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "cloudformation", "domain": 3, "given": null, "correct": true, "note": "UPDATE_ROLLBACK_FAILED -> fix resource, continue-update-rollback"}
|
||||
{"type": "answer", "ts": "2026-11-26T10:33:48+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "testing", "domain": 3, "given": null, "correct": true, "note": "sam local invoke --env-vars overrides function env vars; --parameter-overrides only template parameters"}
|
||||
{"type": "answer", "ts": "2026-11-26T10:33:48+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": true, "note": "Per-request narrowing of one role -> session policy in AssumeRole, not permissions boundary"}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "monitoring-004", "topic": "monitoring", "domain": 4, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "dynamodb-002", "topic": "dynamodb", "domain": 1, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "dynamodb-018", "topic": "dynamodb", "domain": 1, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "apigw-001", "topic": "apigw", "domain": 4, "given": ["A"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "lambda-004", "topic": "lambda", "domain": 1, "given": ["B"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "s3-007", "topic": "s3", "domain": 1, "given": ["A"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "secrets-011", "topic": "secrets", "domain": 2, "given": ["D"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "cloudformation-004", "topic": "cloudformation", "domain": 3, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "lambda-014", "topic": "lambda", "domain": 2, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "cicd-010", "topic": "cicd", "domain": 3, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "containers-008", "topic": "containers", "domain": 3, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "monitoring-010", "topic": "monitoring", "domain": 2, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "lambda-025", "topic": "lambda", "domain": 3, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "iam-015", "topic": "iam", "domain": 2, "given": ["A"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "cloudformation-013", "topic": "cloudformation", "domain": 3, "given": ["A"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "containers-007", "topic": "containers", "domain": 3, "given": ["C"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "lambda-002", "topic": "lambda", "domain": 1, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "lambda-015", "topic": "lambda", "domain": 1, "given": ["A", "E"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "cicd-001", "topic": "cicd", "domain": 2, "given": ["B"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "lambda-008", "topic": "lambda", "domain": 1, "given": ["A"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "cicd-008", "topic": "cicd", "domain": 3, "given": ["B"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "sdk-011", "topic": "sdk", "domain": 1, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "kms-006", "topic": "kms", "domain": 2, "given": ["C"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "testing-003", "topic": "testing", "domain": 1, "given": ["D"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "testing-007", "topic": "testing", "domain": 4, "given": ["C"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "apigw-013", "topic": "apigw", "domain": 3, "given": ["A"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "dynamodb-008", "topic": "dynamodb", "domain": 1, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "optimization-010", "topic": "optimization", "domain": 4, "given": ["A"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "iam-008", "topic": "iam", "domain": 2, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "iam-006", "topic": "iam", "domain": 2, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "secrets-010", "topic": "secrets", "domain": 2, "given": ["A", "B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "streaming-006", "topic": "streaming", "domain": 1, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "streaming-005", "topic": "streaming", "domain": 1, "given": ["A"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "lambda-019", "topic": "lambda", "domain": 1, "given": ["C"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "sam-004", "topic": "sam", "domain": 2, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "troubleshooting-007", "topic": "troubleshooting", "domain": 4, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "xray-004", "topic": "xray", "domain": 4, "given": ["B"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "cloudformation-009", "topic": "cloudformation", "domain": 3, "given": ["D"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "apigw-006", "topic": "apigw", "domain": 2, "given": ["D"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "kms-012", "topic": "kms", "domain": 2, "given": ["D"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "containers-004", "topic": "containers", "domain": 2, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "lambda-010", "topic": "lambda", "domain": 3, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "monitoring-014", "topic": "monitoring", "domain": 4, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "cicd-016", "topic": "cicd", "domain": 3, "given": ["D"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "containers-010", "topic": "containers", "domain": 3, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "dynamodb-001", "topic": "dynamodb", "domain": 1, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "testing-002", "topic": "testing", "domain": 1, "given": ["D"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "apigw-018", "topic": "apigw", "domain": 3, "given": ["A"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "secrets-009", "topic": "secrets", "domain": 2, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "cicd-011", "topic": "cicd", "domain": 4, "given": ["A"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "lambda-007", "topic": "lambda", "domain": 1, "given": ["B"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "patterns-004", "topic": "patterns", "domain": 1, "given": ["A"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "apigw-010", "topic": "apigw", "domain": 4, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "s3-003", "topic": "s3", "domain": 1, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:04+00:00", "session": "9589956e", "mode": "mock", "qid": "dynamodb-005", "topic": "dynamodb", "domain": 1, "given": ["A"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-26T13:58:42+00:00", "session": "9589956e", "mode": "mock", "qid": "secrets-004", "topic": "secrets", "domain": 2, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "summary", "ts": "2026-11-26T13:58:42+00:00", "session": "9589956e", "mode": "mock", "n": 56, "score": 0.732, "by_domain": {"1": [14, 19], "2": [12, 15], "3": [9, 13], "4": [6, 9]}, "by_topic": {"apigw": [4, 5], "cicd": [2, 5], "cloudformation": [2, 3], "containers": [3, 4], "dynamodb": [5, 5], "iam": [2, 3], "kms": [1, 2], "lambda": [5, 9], "monitoring": [3, 3], "optimization": [1, 1], "patterns": [1, 1], "s3": [2, 2], "sam": [1, 1], "sdk": [1, 1], "secrets": [4, 4], "streaming": [1, 2], "testing": [2, 3], "troubleshooting": [1, 1], "xray": [0, 1]}, "minutes": 43.1, "answered": 56, "completed": true}
|
||||
{"type": "answer", "ts": "2026-11-26T14:19:22+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "dynamodb", "domain": 1, "given": null, "correct": true, "note": "WCU: 10 writes/s x ceil(1.5 KB)=2 -> 20 WCU"}
|
||||
{"type": "answer", "ts": "2026-11-26T14:19:23+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "dynamodb", "domain": 1, "given": null, "correct": false, "note": "Transactional reads x2: 6 x ceil(5/4)=2 x2 = 24 RCU (gave 12, forgot x2)"}
|
||||
{"type": "answer", "ts": "2026-11-26T14:19:23+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "dynamodb", "domain": 1, "given": null, "correct": false, "note": "Per minute -> per second first: 120/min = 2/s, x1 unit (3 KB), /2 eventual = 1 RCU (gave 60)"}
|
||||
{"type": "answer", "ts": "2026-11-26T14:21:57+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "dynamodb", "domain": 1, "given": null, "correct": true, "note": "Transactional writes: 4 x ceil(2.5)=3 x2 = 24 WCU"}
|
||||
{"type": "answer", "ts": "2026-11-26T14:21:57+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "dynamodb", "domain": 1, "given": null, "correct": true, "note": "Per minute: 300/min=5/s x ceil(6/4)=2 = 10 RCU strongly consistent"}
|
||||
{"type": "answer", "ts": "2026-11-26T14:32:44+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "lambda", "domain": 1, "given": null, "correct": false, "note": "Cold starts for first 100 requests -> provisioned concurrency (chose reserved again)"}
|
||||
{"type": "answer", "ts": "2026-11-26T14:32:44+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "cicd", "domain": 2, "given": null, "correct": false, "note": "SecureString in CodeBuild -> buildspec env.parameter-store (chose CodePipeline variable again)"}
|
||||
{"type": "answer", "ts": "2026-11-26T14:32:44+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": true, "note": "PutObject on bucket/* object ARN, ListBucket on bucket ARN"}
|
||||
{"type": "answer", "ts": "2026-11-26T14:32:45+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "containers", "domain": 3, "given": null, "correct": true, "note": "Beanstalk blue/green: clone environment, swap URLs"}
|
||||
{"type": "answer", "ts": "2026-11-26T15:09:36+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "cloudformation", "domain": 3, "given": null, "correct": true, "note": "Hard-coded AMI fails in another Region -> SSM parameter type with public /aws/service latest-AMI parameter"}
|
||||
{"type": "answer", "ts": "2026-11-26T15:13:44+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "foundations", "domain": 1, "given": null, "correct": true, "note": "VPC Lambda -> DynamoDB cheapest: gateway endpoint"}
|
||||
{"type": "answer", "ts": "2026-11-26T15:13:45+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "foundations", "domain": 1, "given": null, "correct": true, "note": "VPC Lambda -> third-party public API: NAT gateway"}
|
||||
{"type": "answer", "ts": "2026-11-26T15:13:45+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "foundations", "domain": 1, "given": null, "correct": true, "note": "VPC Lambda -> Secrets Manager privately: interface endpoint (PrivateLink)"}
|
||||
{"type": "answer", "ts": "2026-11-26T15:15:15+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "xray", "domain": 4, "given": null, "correct": true, "note": "Default sampling: 1/s reservoir + 5% of the rest; 100 rps -> ~6/s"}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "optimization-005", "topic": "optimization", "domain": 4, "given": ["C"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "dynamodb-011", "topic": "dynamodb", "domain": 1, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "kms-002", "topic": "kms", "domain": 2, "given": ["A", "B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "cognito-010", "topic": "cognito", "domain": 2, "given": ["C"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "lambda-011", "topic": "lambda", "domain": 3, "given": ["C"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "monitoring-011", "topic": "monitoring", "domain": 2, "given": ["A"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "cloudformation-012", "topic": "cloudformation", "domain": 3, "given": ["D"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "secrets-008", "topic": "secrets", "domain": 2, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "caching-009", "topic": "caching", "domain": 1, "given": ["A"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "apigw-017", "topic": "apigw", "domain": 4, "given": ["B"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "troubleshooting-002", "topic": "troubleshooting", "domain": 4, "given": ["A", "B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "kms-001", "topic": "kms", "domain": 2, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "dynamodb-009", "topic": "dynamodb", "domain": 1, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "cicd-004", "topic": "cicd", "domain": 3, "given": ["D"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "troubleshooting-013", "topic": "troubleshooting", "domain": 4, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "cloudformation-006", "topic": "cloudformation", "domain": 3, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "s3-015", "topic": "s3", "domain": 1, "given": ["D", "E"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "messaging-011", "topic": "messaging", "domain": 1, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "dynamodb-013", "topic": "dynamodb", "domain": 1, "given": ["A"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "cloudformation-003", "topic": "cloudformation", "domain": 3, "given": ["B"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "lambda-021", "topic": "lambda", "domain": 3, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "kms-003", "topic": "kms", "domain": 2, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "cicd-018", "topic": "cicd", "domain": 3, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "apigw-003", "topic": "apigw", "domain": 3, "given": ["C", "D"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "cloudformation-010", "topic": "cloudformation", "domain": 3, "given": ["D"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "dynamodb-006", "topic": "dynamodb", "domain": 1, "given": ["B"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "monitoring-003", "topic": "monitoring", "domain": 4, "given": ["A"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "apigw-007", "topic": "apigw", "domain": 1, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "containers-002", "topic": "containers", "domain": 3, "given": ["A"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "cicd-020", "topic": "cicd", "domain": 3, "given": ["A"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "lambda-001", "topic": "lambda", "domain": 1, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "iam-010", "topic": "iam", "domain": 2, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "apigw-004", "topic": "apigw", "domain": 1, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "secrets-002", "topic": "secrets", "domain": 2, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "troubleshooting-012", "topic": "troubleshooting", "domain": 4, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "messaging-002", "topic": "messaging", "domain": 1, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "secrets-006", "topic": "secrets", "domain": 2, "given": ["A"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "cicd-003", "topic": "cicd", "domain": 3, "given": ["C"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "cicd-005", "topic": "cicd", "domain": 3, "given": ["D"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "apigw-002", "topic": "apigw", "domain": 1, "given": ["A"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "iam-004", "topic": "iam", "domain": 2, "given": ["C"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "containers-005", "topic": "containers", "domain": 3, "given": ["A"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "apigw-015", "topic": "apigw", "domain": 4, "given": ["A"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "sam-003", "topic": "sam", "domain": 4, "given": ["C"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "patterns-001", "topic": "patterns", "domain": 1, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "secrets-007", "topic": "secrets", "domain": 4, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "dynamodb-003", "topic": "dynamodb", "domain": 1, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "kms-004", "topic": "kms", "domain": 2, "given": ["A"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "messaging-010", "topic": "messaging", "domain": 1, "given": ["C"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "streaming-012", "topic": "streaming", "domain": 1, "given": ["B"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "lambda-018", "topic": "lambda", "domain": 4, "given": ["B"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "testing-005", "topic": "testing", "domain": 4, "given": ["D"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "cognito-004", "topic": "cognito", "domain": 2, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "s3-012", "topic": "s3", "domain": 1, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "s3-005", "topic": "s3", "domain": 1, "given": ["D"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "cognito-002", "topic": "cognito", "domain": 2, "given": ["D"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "iam-005", "topic": "iam", "domain": 2, "given": ["C"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "cognito-008", "topic": "cognito", "domain": 2, "given": ["A"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "lambda-009", "topic": "lambda", "domain": 1, "given": ["B"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "sdk-006", "topic": "sdk", "domain": 1, "given": ["C"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "iam-013", "topic": "iam", "domain": 2, "given": ["A"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "cicd-012", "topic": "cicd", "domain": 3, "given": ["C"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "cicd-015", "topic": "cicd", "domain": 3, "given": ["D"], "correct": true, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "sam-008", "topic": "sam", "domain": 2, "given": ["D"], "correct": false, "seconds": null}
|
||||
{"type": "answer", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "qid": "messaging-014", "topic": "messaging", "domain": 1, "given": ["B", "C"], "correct": true, "seconds": null}
|
||||
{"type": "summary", "ts": "2026-11-27T14:48:31+00:00", "session": "2f9c4ff8", "mode": "mock", "n": 65, "score": 0.708, "by_domain": {"1": [16, 21], "2": [13, 17], "3": [11, 16], "4": [6, 11]}, "by_topic": {"apigw": [4, 6], "caching": [1, 1], "cicd": [5, 7], "cloudformation": [2, 4], "cognito": [3, 4], "containers": [2, 2], "dynamodb": [3, 5], "iam": [2, 4], "kms": [4, 4], "lambda": [3, 5], "messaging": [3, 4], "monitoring": [2, 2], "optimization": [0, 1], "patterns": [1, 1], "s3": [2, 3], "sam": [0, 2], "sdk": [1, 1], "secrets": [4, 4], "streaming": [0, 1], "testing": [1, 1], "troubleshooting": [3, 3]}, "minutes": 64.6, "answered": 65, "completed": true}
|
||||
{"type": "answer", "ts": "2026-11-27T15:04:53+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "dynamodb", "domain": 1, "given": null, "correct": true, "note": "LSI for strong reads + 2nd sort key, at creation (mock #2 re-check)"}
|
||||
{"type": "answer", "ts": "2026-11-27T15:04:53+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "cicd", "domain": 3, "given": null, "correct": true, "note": "CodeBuild VPC config to reach private resources (mock #2 re-check)"}
|
||||
{"type": "answer", "ts": "2026-11-27T15:04:54+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "apigw", "domain": 4, "given": null, "correct": true, "note": "Latency ~ IntegrationLatency -> backend is slow (mock #2 re-check)"}
|
||||
{"type": "answer", "ts": "2026-11-27T15:04:54+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "lambda", "domain": 4, "given": null, "correct": true, "note": "SnapStart: cold starts without idle cost (mock #2 re-check)"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:04:03+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "dynamodb", "domain": 1, "given": null, "correct": true, "note": "drill: RCU eventual 7 KB x100 = 100"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:04:03+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "dynamodb", "domain": 1, "given": null, "correct": true, "note": "drill: WCU transactional 7 KB x20 = 280"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:04:04+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "lambda", "domain": 1, "given": null, "correct": true, "note": "drill: 250 MB unzipped, 10 GB image"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:04:04+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "lambda", "domain": 4, "given": null, "correct": true, "note": "drill: concurrency = rps x duration, 200 < 1000"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:04:04+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "xray", "domain": 4, "given": null, "correct": false, "note": "drill: X-Ray default sampling = 1 req/s reservoir + 5% (said 5/s + 1%)"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:06:57+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "messaging", "domain": 1, "given": null, "correct": true, "note": "drill: SQS visibility timeout >= 6x Lambda timeout"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:06:57+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "messaging", "domain": 1, "given": null, "correct": false, "note": "drill: SQS visibility default 30 s, max 12 h"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:06:57+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "messaging", "domain": 1, "given": null, "correct": false, "note": "drill: SQS retention default 4 days, max 14 days"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:06:58+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "messaging", "domain": 1, "given": null, "correct": true, "note": "drill: large payload -> S3 + pointer (claim check)"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:06:58+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "messaging", "domain": 1, "given": null, "correct": false, "note": "drill: SQS max message 256 KB (exam value, now 1 MiB)"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:06:58+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "streaming", "domain": 1, "given": null, "correct": false, "note": "drill: Kinesis shard write 1 MB/s or 1,000 rec/s, read 2 MB/s shared"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:06:58+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "lambda", "domain": 1, "given": null, "correct": true, "note": "drill: async = 2 retries"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:06:59+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "lambda", "domain": 1, "given": null, "correct": false, "note": "drill: async max event age 6 h"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:10:29+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "dynamodb", "domain": 1, "given": null, "correct": false, "note": "drill: DynamoDB max item 400 KB (said 1 MB)"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:10:29+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "kms", "domain": 2, "given": null, "correct": true, "note": "drill: KMS Encrypt max 4 KB"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:10:30+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "kms", "domain": 2, "given": null, "correct": false, "note": "drill: above 4 KB -> envelope encryption (GenerateDataKey)"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:10:30+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "apigw", "domain": 4, "given": null, "correct": false, "note": "drill: REST integration timeout 29 s -> 504 (said 15 min, 502/503)"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:10:30+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "streaming", "domain": 1, "given": null, "correct": false, "note": "drill: Step Functions Express 5 min, Standard 1 year"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:10:31+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "monitoring", "domain": 4, "given": null, "correct": false, "note": "drill: CloudWatch Logs default retention = never expire"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:31:39+00:00", "session": "tutor", "mode": "tutor", "qid": "patterns-007", "topic": "patterns", "domain": 1, "given": ["B"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-29T17:31:39+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": false, "note": "quiz 29 Nov: per-request scoping -> session policy in AssumeRole (torn A boundary / D)"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:31:39+00:00", "session": "tutor", "mode": "tutor", "qid": "cicd-017", "topic": "cicd", "domain": 3, "given": ["D"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-29T17:31:40+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "xray", "domain": 4, "given": null, "correct": true, "note": "quiz 29 Nov: X-Ray trace map first, then CloudWatch on that service"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:31:40+00:00", "session": "tutor", "mode": "tutor", "qid": "sam-010", "topic": "sam", "domain": 3, "given": ["B", "C"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-11-29T17:31:40+00:00", "session": "tutor", "mode": "tutor", "qid": "containers-015", "topic": "containers", "domain": 3, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-29T17:31:41+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "kms", "domain": 2, "given": null, "correct": true, "note": "quiz 29 Nov: Database Encryption SDK GenerateDataKey -> symmetric key"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:31:41+00:00", "session": "tutor", "mode": "tutor", "qid": "lambda-034", "topic": "lambda", "domain": 1, "given": ["C"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-29T17:31:41+00:00", "session": "tutor", "mode": "tutor", "qid": "cicd-021", "topic": "cicd", "domain": 3, "given": ["B"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-29T17:31:41+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "cloudformation", "domain": 3, "given": null, "correct": true, "note": "quiz 29 Nov: UPDATE_ROLLBACK_FAILED -> ContinueUpdateRollback"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:31:42+00:00", "session": "tutor", "mode": "tutor", "qid": "xray-009", "topic": "xray", "domain": 4, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-29T17:31:42+00:00", "session": "tutor", "mode": "tutor", "qid": "testing-016", "topic": "testing", "domain": 3, "given": ["C"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-29T17:31:42+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "containers", "domain": 3, "given": null, "correct": true, "note": "quiz 29 Nov: Beanstalk blue/green = cloned env + swap URLs"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:31:43+00:00", "session": "tutor", "mode": "tutor", "qid": "kms-014", "topic": "kms", "domain": 2, "given": ["A", "D"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-11-29T17:31:43+00:00", "session": "tutor", "mode": "tutor", "qid": "sam-002", "topic": "sam", "domain": 3, "given": ["D"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-29T17:31:43+00:00", "session": "tutor", "mode": "tutor", "qid": "lambda-020", "topic": "lambda", "domain": 4, "given": ["B"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-29T17:31:44+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "lambda", "domain": 4, "given": null, "correct": true, "note": "quiz 29 Nov: DB connection at module level, outside the handler"}
|
||||
{"type": "answer", "ts": "2026-11-29T17:31:44+00:00", "session": "tutor", "mode": "tutor", "qid": "cloudformation-015", "topic": "cloudformation", "domain": 3, "given": ["C"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-29T17:31:44+00:00", "session": "tutor", "mode": "tutor", "qid": "containers-003", "topic": "containers", "domain": 4, "given": ["C"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-11-29T17:31:45+00:00", "session": "tutor", "mode": "tutor", "qid": "monitoring-002", "topic": "monitoring", "domain": 4, "given": ["A"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-30T09:24:36+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "dynamodb", "domain": 1, "given": null, "correct": true, "note": "drill: DynamoDB item max 400 KB"}
|
||||
{"type": "answer", "ts": "2026-11-30T09:24:36+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "streaming", "domain": 1, "given": null, "correct": true, "note": "drill: Kinesis shard 1 MB/s or 1,000 rec/s in, 2 MB/s out"}
|
||||
{"type": "answer", "ts": "2026-11-30T09:24:37+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "messaging", "domain": 1, "given": null, "correct": true, "note": "drill: SQS visibility 30 s / 12 h, retention 4 / 14 days"}
|
||||
{"type": "answer", "ts": "2026-11-30T09:24:37+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "messaging", "domain": 1, "given": null, "correct": true, "note": "drill: SQS message 256 KB on the exam (1 MiB today)"}
|
||||
{"type": "answer", "ts": "2026-11-30T09:24:37+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "lambda", "domain": 1, "given": null, "correct": false, "note": "drill: Lambda async: 2 retries, max event age 6 h (6 h not recalled)"}
|
||||
{"type": "answer", "ts": "2026-11-30T09:24:38+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "apigw", "domain": 4, "given": null, "correct": true, "note": "drill: API Gateway REST 29 s -> 504"}
|
||||
{"type": "answer", "ts": "2026-11-30T09:24:38+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "streaming", "domain": 1, "given": null, "correct": true, "note": "drill: Express 5 min / Standard 1 year"}
|
||||
{"type": "answer", "ts": "2026-11-30T09:24:38+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "monitoring", "domain": 4, "given": null, "correct": true, "note": "drill: CloudWatch Logs never expire by default"}
|
||||
{"type": "answer", "ts": "2026-11-30T09:24:39+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "xray", "domain": 4, "given": null, "correct": true, "note": "drill: X-Ray default sampling 1 req/s + 5%"}
|
||||
{"type": "answer", "ts": "2026-11-30T09:24:39+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "kms", "domain": 2, "given": null, "correct": true, "note": "drill: envelope encryption = GenerateDataKey"}
|
||||
{"type": "answer", "ts": "2026-11-30T09:24:39+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "iam", "domain": 2, "given": null, "correct": true, "note": "drill: narrow one AssumeRole session = session policy"}
|
||||
{"type": "answer", "ts": "2026-11-30T09:24:40+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "lambda", "domain": 3, "given": null, "correct": true, "note": "drill: event source mapping targets the alias ARN; release = move the alias to v2"}
|
||||
{"type": "answer", "ts": "2026-11-30T09:24:40+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "kms", "domain": 2, "given": null, "correct": false, "note": "drill: temporary key access, no key policy edit = KMS grant (CreateGrant, RetireGrant/RevokeGrant); chose a new key"}
|
||||
{"type": "answer", "ts": "2026-11-30T09:24:40+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "containers", "domain": 4, "given": null, "correct": true, "note": "drill: ResourceInitializationError pulling secrets = task execution role"}
|
||||
{"type": "answer", "ts": "2026-11-30T09:24:41+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "containers", "domain": 3, "given": null, "correct": false, "note": "drill: Beanstalk % of traffic + evaluation + auto rollback = traffic splitting (needs ALB); answered canary + aliases"}
|
||||
{"type": "answer", "ts": "2026-11-30T10:15:24+00:00", "session": "tutor", "mode": "tutor", "qid": "lambda-018", "topic": "lambda", "domain": 4, "given": ["C"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-30T10:15:25+00:00", "session": "tutor", "mode": "tutor", "qid": "cloudformation-010", "topic": "cloudformation", "domain": 3, "given": ["B"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-30T10:15:25+00:00", "session": "tutor", "mode": "tutor", "qid": "cicd-001", "topic": "cicd", "domain": 2, "given": ["B"], "correct": false}
|
||||
{"type": "answer", "ts": "2026-11-30T10:15:25+00:00", "session": "tutor", "mode": "tutor", "qid": "containers-007", "topic": "containers", "domain": 3, "given": ["D"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-30T10:15:26+00:00", "session": "tutor", "mode": "tutor", "qid": "cloudformation-013", "topic": "cloudformation", "domain": 3, "given": ["D"], "correct": true}
|
||||
{"type": "answer", "ts": "2026-11-30T10:15:26+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "kms", "domain": 2, "given": null, "correct": true, "note": "temporary key access, no key policy edit = KMS grant"}
|
||||
{"type": "answer", "ts": "2026-11-30T10:15:26+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "containers", "domain": 3, "given": null, "correct": true, "note": "Beanstalk % of real traffic + auto rollback = traffic splitting (ALB)"}
|
||||
{"type": "answer", "ts": "2026-11-30T10:15:27+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "dynamodb", "domain": 1, "given": null, "correct": true, "note": "strong reads on another sort key = LSI at table creation"}
|
||||
{"type": "answer", "ts": "2026-11-30T10:15:27+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "lambda", "domain": 1, "given": null, "correct": true, "note": "drill: Lambda max timeout 15 min"}
|
||||
{"type": "answer", "ts": "2026-11-30T10:15:27+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "lambda", "domain": 1, "given": null, "correct": true, "note": "drill: 250 MB unzipped / 10 GB image"}
|
||||
{"type": "answer", "ts": "2026-11-30T10:15:28+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "lambda", "domain": 1, "given": null, "correct": false, "note": "drill: Lambda sync payload 6 MB (answered 256 KB)"}
|
||||
{"type": "answer", "ts": "2026-11-30T10:15:28+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "lambda", "domain": 1, "given": null, "correct": true, "note": "drill: SQS visibility >= 6x function timeout"}
|
||||
{"type": "answer", "ts": "2026-11-30T10:15:28+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "messaging", "domain": 1, "given": null, "correct": false, "note": "drill: SQS long polling max 20 s (answered 600 s)"}
|
||||
{"type": "answer", "ts": "2026-11-30T10:15:29+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "streaming", "domain": 1, "given": null, "correct": false, "note": "drill: DynamoDB Streams 24 h, Kinesis 24 h default up to 365 days (answered 5 s)"}
|
||||
{"type": "answer", "ts": "2026-11-30T10:15:29+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "kms", "domain": 2, "given": null, "correct": false, "note": "drill: KMS Encrypt max 4 KB (answered 5 MB)"}
|
||||
{"type": "answer", "ts": "2026-11-30T10:15:29+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "caching", "domain": 4, "given": null, "correct": false, "note": "drill: API Gateway cache TTL 300 s default / 3,600 s max (answered 600 s / 15 min)"}
|
||||
{"type": "answer", "ts": "2026-11-30T10:15:30+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "messaging", "domain": 1, "given": null, "correct": true, "note": "drill: FIFO dedup interval 5 min"}
|
||||
{"type": "answer", "ts": "2026-11-30T10:15:30+00:00", "session": "tutor", "mode": "tutor", "qid": null, "topic": "xray", "domain": 4, "given": null, "correct": true, "note": "drill: X-Ray daemon UDP 2000"}
|
||||
+1
-1
@@ -48,7 +48,7 @@ def test_study_plan_days_dates_and_weekdays_are_consistent():
|
||||
plan = (ROOT / "STUDY_PLAN.md").read_text(encoding="utf-8")
|
||||
rows = re.findall(r"^\| D(\d+) \| (\w{3}) (\d{1,2}) (\w{3}) \|", plan, re.MULTILINE)
|
||||
assert [int(n) for n, *_ in rows] == list(range(1, 36))
|
||||
start = date(2026, 10, 27)
|
||||
start = date(2026, 10, 22)
|
||||
for n, weekday, day, month in rows:
|
||||
when = datetime.strptime(f"{day} {month} 2026", "%d %b %Y").date()
|
||||
assert (when, when.strftime("%a")) == (start + timedelta(days=int(n) - 1), weekday), f"D{n}"
|
||||
|
||||
Reference in new issue
Block a user