Module 4: API Development & Integration
Design, publish, secure and operate APIs on AWS, and integrate safely with partners, AWS services and on-premises banking systems. You finish by building an Account Information API where each customer can see only their own accounts, protected by Cognito, WAF and throttling.
Assumes: .NET 10 LTS · AWS SDK for .NET v4 · Microsoft.Extensions.Http.Resilience · Region us-east-1. Verified against official sources on 2026-11-18.
Design, publish, secure and operate APIs on AWS, and integrate safely with partners, AWS services and on-premises banking systems. You finish by building an Account Information API where each customer can see only their own accounts, protected by Cognito, WAF and throttling.
| Estimated time | About 26 hours (lessons 16 h · labs 6 h · project 4 h) |
| Priority for you | ⭐ Critical — priority 2 (APIs and integration) |
| Level | Intermediate → advanced |
| Certifications | DVA-C03 (primary) · SAA-C03 · SCS-C03 |
| Cost profile | 🟢 API Gateway + Lambda + Cognito labs · 🟡 WAF, VPC Link · 🔴 Transfer Family, Amazon MQ (local alternatives) |
Why this matters in banking
Banks are integration businesses. A single payment can touch a mobile app, an API gateway, a fraud service, a sanctions-screening partner, a core banking system on a mainframe and an ISO 20022 message to a clearing network. Each hop is a place where a retry can double-charge a customer, a missing authorisation check can leak someone else's balance (the number-one item in the OWASP API Security Top 10), or a partner timeout can stall a batch. This module teaches you to build APIs and integrations that are correct, idempotent, observable and safe under failure.
From .NET/Azure to AWS
| You know (Microsoft/Azure) | AWS equivalent | What's different |
|---|---|---|
| Azure API Management | Amazon API Gateway (REST, HTTP, WebSocket APIs) | Three API types with different features and prices; no built-in developer portal on HTTP APIs |
| APIM policies (rate limit, validate) | Usage plans, throttling, request validators, Lambda authorizers | Logic that APIM does in XML policies moves into config, authorizers or your code |
| Entra ID / Azure AD B2C | Amazon Cognito user pools (and resource servers for scopes) | Cognito issues the JWTs; your API validates them |
[Authorize] with JWT bearer | API Gateway JWT/Cognito authorizers + ASP.NET Core policies | Validate at the edge and enforce ownership in code |
| Managed identity calling Azure APIs | IAM roles + SigV4-signed requests | Every AWS API call is signed; the SDK does it for you |
| Private Endpoint to App Service | VPC Link / private APIs / PrivateLink | API Gateway reaches private ALB/NLB targets through a VPC Link |
| Azure Front Door WAF | AWS WAF on API Gateway, ALB or CloudFront | Managed rule groups plus your own rate-based rules |
Polly in HttpClientFactory | Same: Microsoft.Extensions.Http.Resilience | Unchanged — your .NET resilience skills transfer directly |
| Azure Service Bus / IBM MQ bridges | Amazon MQ (ActiveMQ/RabbitMQ), SQS | Amazon MQ exists for legacy JMS/AMQP protocols |
| SFTP on a VM / Azure Blob SFTP | AWS Transfer Family (SFTP into S3) | Fully managed endpoint; billed per hour while enabled |
Learning objectives
By the end of this module you can:
- Design a REST API with correct status codes, pagination, filtering, versioning, idempotency keys and ProblemDetails errors, documented in OpenAPI.
- Choose between API Gateway REST, HTTP and WebSocket APIs, and integrate them with Lambda, ALB/NLB and private services through VPC Link.
- Secure APIs with OAuth 2.0/OIDC tokens from Cognito, Lambda authorizers, IAM/SigV4 and mTLS — and explain which fits which caller.
- Apply throttling, usage plans, request validation, CORS and WAF rules, and map controls to the OWASP API Security Top 10.
- Send and receive webhooks with HMAC signatures and replay protection.
- Call partner APIs safely from AWS with controlled egress, secrets, timeouts, retries and circuit breakers.
- Sign an AWS API request by hand with SigV4 and explain what the SDK does for you.
- Describe Open Banking/PSD2 consent flows, ISO 20022 messages, SFTP/PGP file integration and private connectivity to core banking systems.
Prerequisites
- Module 2: Networking — VPCs, load balancers, endpoints
- Module 3: .NET on AWS — SDK, Lambda, ECS, configuration and logging
- Recommended: identity lessons of Module 5: Security
How the pieces fit
Every layer has a job: WAF filters abuse, API Gateway validates tokens and throttles, and your .NET code enforces the business rule that a customer sees only their own data.
Lessons
Lessons are in teaching order: where a lesson lists another as a prerequisite, that one comes first. Lab pages sit right after the lesson they support.
- REST API design for banking — resources, status codes, pagination, filtering, versioning and ProblemDetails errors.
- Idempotency keys — making POST safe to retry, with storage, expiry and response replay.
- OpenAPI contracts and contract testing — design-first APIs, generated clients and consumer-driven contract tests (includes Lab 4.1).
- Amazon API Gateway: REST vs HTTP vs WebSocket — features, limits, pricing and a decision table.
- Authentication fundamentals: OAuth 2.0, OIDC and JWT — the token concepts API builders need.
- Amazon Cognito user pools — user pools, app clients, resource servers and custom scopes.
- Lambda integrations — proxy integrations, payload formats and error mapping (includes Lab 4.2).
- Container-backed APIs and VPC Link — ALB/NLB integrations and private integrations through VPC Link.
- Lambda authorizers — token and request authorizers, caching and least-privilege policies.
- IAM/SigV4 authorisation and mTLS — machine-to-machine callers, private APIs and client certificates.
- Request validation, models and CORS — rejecting bad input early and finally understanding preflight requests.
- Webhooks — sending and receiving, HMAC signature verification, timestamps and replay protection.
- Lab: Webhook receiver with HMAC verification (Lab 4.3) — the hands-on checkpoint for the webhooks lesson.
- Calling partner APIs safely — egress, secrets, timeouts, retries, circuit breakers and partner rate limits with
Microsoft.Extensions.Http.Resilience(includes Lab 4.4). - API keys, usage plans, throttling and rate limiting — what API keys are and are not for.
- Calling AWS APIs from C#: the SDK and SigV4 — the SDK path and a hand-written SigV4 signer, so you see exactly what is signed.
- Service-to-service communication — IAM auth, private APIs and service discovery.
- Lab: Hand-sign an AWS request with SigV4 (Lab 4.5) — the hands-on checkpoint for lessons 16 and 17.
- API monitoring — access logs, CloudWatch metrics, X-Ray traces and alarms that matter.
- API security: WAF and the OWASP API Top 10 — AWS WAF managed and rate-based rules, and the OWASP API Security Top 10 applied to a banking API.
- Open Banking / PSD2-style APIs — consent, OAuth 2.0/OIDC flows and FAPI basics.
- ISO 20022 message handling — pain.001, pacs.008 and camt.053 structure, validation and C# classes generated from XSDs.
- SWIFT and file-based integration with AWS Transfer Family — SFTP, PGP-encrypted files and checksum validation.
- Integrating with core banking and mainframes — VPN/Direct Connect, private APIs and MQ-style messaging with Amazon MQ.
- Module project: the Account Information API — Cognito, ownership checks, idempotency, throttling and WAF, with a 55-test local suite.
Labs and module project
Three lab folders live under labs/ in the repository, each GitHub-ready with a README and tests that pass without an AWS account. The other labs are written inside the lesson that teaches them.
| Lab | Where it lives | Label |
|---|---|---|
| Lab 4.1 — Design the Account Information API in OpenAPI and generate a typed C# client | Inside OpenAPI contracts and contract testing | 🟢 |
Lab 4.2 — HTTP API + Lambda (dotnet10) with a Cognito JWT authorizer and scopes | Inside Lambda integrations | 🟢 |
| Lab 4.3 — Webhook receiver with HMAC verification and replay protection | Lab page · labs/m04-webhook-hmac (44 tests pass) | 🟢 |
| Lab 4.4 — Resilient partner client: timeouts, retries with jitter, circuit breaker, fault-injecting fake partner | Inside Calling partner APIs safely | 🟢 |
| Lab 4.5 — Hand-sign a SigV4 request to STS and compare it with the SDK | Lab page · labs/m04-sigv4-signer (9 tests pass, 1 skipped without AWS credentials) | 🟢 |
| Lab 4.6 — Parse and validate a fictional pacs.008 and camt.053 | Coming. The ISO 20022 lesson has self-contained code; the full lab folder is not written yet | 🟢 |
| Lab 4.7 — Attach AWS WAF with a rate-based rule, attack your own API, then delete the web ACL | Part 5 of the module project, with the concepts in API security | 🟡 |
Module project: Account Information API (labs/m04-account-information-api, 54 tests pass, 1 skipped). Build an API that securely retrieves dummy customer account data from a protected backend. It demonstrates authentication (Cognito), authorisation (a customer sees only their own accounts, tested with a second user), input validation, idempotency on the one write endpoint, structured logging with correlation IDs, ProblemDetails errors, throttling and AWS WAF. This becomes the core of Capstone 1. The local test suite needs no AWS account. Its CDK stack compiles but has not been synthesised, so the cdk-nag acknowledgment IDs are marked ⚠ VERIFY on the project page.
When you finish, keep the Module 4 cheat sheet handy for revision.
Cost profile
| Part | Label | Free alternative |
|---|---|---|
| API design, OpenAPI, webhooks, resilience, SigV4, ISO 20022 labs | 🟢 free | All run locally |
| API Gateway HTTP API + Lambda + Cognito | 🟢 free | Lab traffic sits inside free allowances; check Cognito pricing tier ⚠ VERIFY |
| VPC Link to a private ALB/NLB | 🟡 credits | Load balancer bills hourly; deploy-and-destroy in one session |
| AWS WAF | 🟡 credits | Monthly web ACL and rule fees, prorated ⚠ VERIFY; attach, test, delete the same day |
| AWS Transfer Family SFTP | 🔴 paid | Local SFTP server in Docker + upload to S3 with the SDK; Transfer Family as design-only |
| Amazon MQ | 🔴 paid | RabbitMQ or ActiveMQ in Docker locally; same client code |
| Direct Connect / Site-to-Site VPN | 🔴 paid | Design-only exercise (see Module 2) |
Certification alignment
| Exam | Domains (weight) | What this module covers |
|---|---|---|
| DVA-C03 | Development (30%) · Security (26%) · Troubleshoot (22%) | API Gateway, Lambda integrations, Cognito, throttling, X-Ray |
| SAA-C03 | Secure (30%) · High-Performing (24%) | API types, private integrations, WAF, caching |
| SCS-C03 | Infrastructure Security (18%) · IAM (20%) | Edge protection, authorizers, SigV4, mTLS |
Service availability notes
Services that changed — verified 2026-11-17
AWS Mainframe Modernization managed runtime environments closed to new customers on 2025-11-07, and the self-managed experience entered maintenance (announced 2026-06-30). This module therefore integrates with mainframes through private networking and messaging rather than that service.
Amazon Cognito Sync is in maintenance. It is unrelated to Cognito user pools, which this module uses.
Compliance boundary
Open Banking, PSD2 and FAPI lessons explain patterns with fictional data. Real implementations need review by your bank's legal, compliance and security teams against the rules that apply to you (UK GDPR is this platform's reference flavour).
Key AWS services
Amazon API Gateway (REST, HTTP, WebSocket) · AWS Lambda · Amazon ECS on Fargate · Elastic Load Balancing (ALB, NLB) · VPC Link · Amazon Cognito · AWS WAF · AWS IAM (SigV4) · AWS Certificate Manager (mTLS) · AWS Secrets Manager · Amazon CloudWatch · AWS X-Ray · AWS Transfer Family · Amazon MQ · AWS Cloud Map · AWS PrivateLink
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 3 cheat sheet
One-page revision summary for .NET Application Development on AWS: services, Azure mapping, CLI commands, limits, decision rules, exam traps and cost traps.
REST API design for banking
Design resource URIs, status codes, pagination, money fields, versioning and RFC 9457 problem details for a banking API, and implement them in ASP.NET Core 10.