Module 4 cheat sheet
One-page revision summary for API Development & Integration: services, Azure mapping, CLI commands, limits, decision rules, exam traps and cost traps.
Assumes: AWS CLI v2 · AWS SDK for .NET v4 · .NET 10 · Microsoft.Extensions.Http.Resilience · Region us-east-1 · facts as stated in the Module 4 lessons; items marked VERIFY there are not repeated as certain here. Verified against official sources on 2026-11-18.
A printable summary of Module 4. Each row links back to the lesson with the detail.
Key services
| Service | What it is for |
|---|---|
| API Gateway REST API | Full feature set: WAF, API keys and usage plans, caching, request validation, private endpoints, response streaming |
| API Gateway HTTP API | Cheaper and simpler: JWT authorizers, Lambda and private integrations; no WAF, keys or request validation |
| API Gateway WebSocket API | Server push over persistent connections |
| Amazon Cognito user pools | Issues OIDC/OAuth 2.0 tokens; resource servers define custom scopes |
| Lambda authorizer | Custom credential checks; returns a cached IAM policy and context |
| IAM + SigV4, mTLS | Machine identity: IAM inside AWS, client certificates for outside partners |
| VPC link (V2) | Private route from API Gateway to ALB/NLB and ECS tasks |
| AWS WAF | Managed rules and rate-based rules in front of REST APIs, ALB, CloudFront |
| DynamoDB + TTL | Idempotency store using conditional writes |
| SQS + DLQ | Acknowledge webhooks fast, process later |
| Transfer Family | Managed SFTP into S3 for partner files |
| Amazon MQ | Legacy JMS/AMQP protocol compatibility (not IBM MQ) |
.NET / Azure → AWS
| Microsoft / Azure | AWS |
|---|---|
| Azure API Management | API Gateway (REST / HTTP / WebSocket) |
| APIM rate-limit policy | Stage/method throttling, usage plans, WAF rate rules |
| Entra ID / B2C | Cognito user pools |
[Authorize] JWT bearer | Gateway JWT/Cognito authorizer plus ASP.NET Core policies |
| Managed identity calling Azure | IAM role + SigV4 (SDK signs for you) |
| Private Endpoint | Private REST API, VPC link, PrivateLink |
| Front Door WAF | AWS WAF web ACL |
Polly / HttpClientFactory | Microsoft.Extensions.Http.Resilience (unchanged) |
| Service Bus bridge | SQS, Amazon MQ |
| Blob SFTP | Transfer Family |
Most useful CLI commands
| Task | Command |
|---|---|
| Who am I? | aws sts get-caller-identity --profile learn-sandbox |
| Find HTTP APIs | aws apigatewayv2 get-apis |
| Stage throttling | aws apigateway update-stage --rest-api-id ID --stage-name learn --patch-operations ... |
| Gateway error shapes | aws apigateway put-gateway-response ... |
| Redeploy after changes | aws apigateway create-deployment --rest-api-id ID --stage-name learn |
| Idempotency TTL | aws dynamodb update-time-to-live --table-name NAME --time-to-live-specification Enabled=true,AttributeName=expiresAt |
| Let API Gateway invoke Lambda | aws lambda add-permission ... |
| Log retention | aws logs put-retention-policy --log-group-name NAME --retention-in-days 14 |
| Delete a REST API | aws apigateway delete-rest-api --rest-api-id ID |
| Anything left over? | aws resourcegroupstaggingapi get-resources --tag-filters Key=Project,Values=cea-lab |
Key limits and defaults
| Item | Value | Lesson |
|---|---|---|
| Integration timeout | 29 seconds by default for REST (Regional/private can request more); streaming lifts it | API Gateway |
| Payload size | 10 MB REST and HTTP; WebSocket 128 KB per message, 32 KB per frame | API Gateway |
| Account throttle (us-east-1) | 10,000 requests per second steady, 5,000 burst, shared by all API types | Keys and throttling |
| Throttling model | Token bucket; empty bucket returns 429 | Keys and throttling |
| REST quotas | 10,000 API keys (fixed), 300 usage plans, 10 plans per key | Keys and throttling |
| Lambda authorizer cache | 300 s default, 3,600 s maximum, per identity source | Lambda authorizers |
| Resource policy size | 8,192 characters by default; REST only | IAM, SigV4 and mTLS |
| mTLS | Regional custom domain, TLS 1.2 policy, truststore (PEM) in S3 | IAM, SigV4 and mTLS |
| Pricing, us-east-1 | HTTP API about USD 1.00 and REST USD 3.50 per million requests | API Gateway |
| Lambda payload format | REST = 1.0, HTTP = 2.0 | Lambda integrations |
| Cognito Essentials | Free to 10,000 MAU; M2M token requests billed from the first | Cognito |
| Webhook timestamp tolerance | About five minutes, HMAC-SHA256 over id.timestamp.body | Webhooks |
| Idempotency outcomes | Replay 200 · different body 422 · in flight 409 · missing 400 | Idempotency keys |
| REST models | JSON Schema draft 4 | Validation and CORS |
Decision rules
| If… | Then… |
|---|---|
| Need WAF, keys, caching or validation at the gateway | REST API |
| Cost and simplicity matter, JWT auth is enough | HTTP API (front with CloudFront plus WAF if WAF is needed) |
| Customer or partner is a person or app with a Cognito login | Authorization code + PKCE, Cognito/JWT authorizer |
| Machine caller inside AWS | IAM + SigV4, no secrets |
| Partner outside AWS with certificates | mTLS on a Regional custom domain |
| Custom credential or lookup | Lambda authorizer; keep ownership checks in the backend |
| Backend is private ECS/ALB | VPC link V2 |
| POST must survive retries | Idempotency key plus domain uniqueness |
| Partner calls you | Verify HMAC on the raw body, acknowledge fast, process via SQS |
| Calling a partner | Fixed egress, one resilience handler, retry only idempotent transient failures |
| Long download over 29 s or 10 MB | Response streaming or pre-signed S3 URL |
| Core banking write timed out | Unknown outcome: query by idempotency key, never blindly retry |
| New WAF rules | Count mode first, read logs, then Block |
Common exam traps
- API keys are not authentication. They identify a plan for throttling and quotas.
- WAF attaches to REST APIs, not HTTP APIs.
- A Deny policy returns 403;
Unauthorizedreturns 401; any other authorizer error returns 500. - Cached authorizer policies apply to later requests with the same identity source: use wildcard resources.
- Cognito access tokens have no
audby default; checkclient_idandtoken_use. - Custom scopes come from OAuth endpoints, not SDK sign-in.
- A JWT is signed, not encrypted. APIs accept access tokens, not ID tokens.
- Token validity is not object ownership (OWASP API1): return 404 for others' objects.
- API Gateway does not health-check targets; the load balancer does.
- Lambda timeout must be below the gateway timeout, and the function keeps running after the client gives up.
- CORS is browser enforcement; it does not protect the API from other callers.
- Parameter validation checks presence only and is absent on HTTP APIs.
Cost traps
| Trap | Avoid it by |
|---|---|
| Transfer Family endpoint left running (about USD 0.30 per protocol-hour) | Delete the server after the lab; stopping is not enough |
| Load balancer and NAT gateway behind a VPC link | Deploy and destroy within the session |
| WAF web ACL and rule fees | Attach, test, delete the same day |
| Amazon MQ broker | Use RabbitMQ or ActiveMQ in Docker locally |
| Cognito M2M token requests | Cache tokens in the client until near expiry |
| Verbose access logs and X-Ray traces | Set retention, sample traces |
| Lambda retries and duplicate webhooks | Idempotent handlers and a DLQ |
Independent learning resource — not affiliated with, endorsed or sponsored by Amazon Web Services. AWS and related marks are trademarks of Amazon.com, Inc. or its affiliates. All banking data in examples is fictional. Sample architectures are for learning and are not automatically compliant with GDPR, PCI DSS or any banking regulation.
Module project: the Account Information API (Cognito, ownership checks, idempotency, throttling and WAF)
Run, attack and optionally deploy a .NET 10 Account Information API where each customer sees only their own accounts: Cognito access tokens and scopes, server-side customer mapping, validation, idempotent statement requests, ProblemDetails, correlation IDs, throttling and AWS WAF.
Module 5: Security for Banking & Finance
The most important module on the platform: identity, encryption, network protection, detection, incident response and secure delivery on AWS, all through a banking lens. You learn exactly where AWS's responsibility ends and the bank's begins, and you build a secure banking API architecture with an incident-response runbook.