Learning path

AWS for developers: serverless APIs, containers and security

  • 4 labs
  • 8 h
  • Intermediate → Advanced

This path prepares you for the certificationAWS Certified Developer - AssociateDVA-C02

Mireille Ekambi launched Sawa Express in Douala: parcels delivered by motorbike across the city. Everything still runs on WhatsApp and a spreadsheet, and customers call all day long to find out where their parcel is. Patrick is writing the mobile app. You build the API, on AWS. Four workshops follow the app: a serverless HTTP API with AWS Lambda, API Gateway and DynamoDB, photo proof of delivery processed asynchronously with S3, EventBridge and SQS, a containerized pricing service with Docker, Amazon ECR and ECS Fargate, then an API protected by Amazon Cognito and JWTs, with its secrets in Secrets Manager and its data encrypted with KMS. Each workshop runs in a real AWS console and in AWS CloudShell, with no AWS account to open and no credit card to give. You write the code, deploy it, test the API the way the app will call it, and checks verify what you built. Each workshop ends with exam questions: the path prepares you for the AWS Certified Developer - Associate certification (DVA-C02). Eight hours of hands-on practice, from intermediate to advanced.

The steps

  1. Step 1
    General

    AWS Lambda and API Gateway: a serverless HTTP API with DynamoDB

    At Sawa Express, in Douala, the phone rings all day: forty customers a day want to know where their parcel is. Patrick is finishing the mobile app that will let them track their deliveries on their own. All he is missing is the API, and he wants it by Friday. You build it on AWS, with no server to manage: an AWS Lambda function for the logic, Amazon API Gateway for the public address, Amazon DynamoDB for the parcels. From AWS CloudShell, you create the table, deploy the function, give it the one permission it lacks, then expose three routes: create a parcel, track it, move its delivery forward. You then test the API the way Patrick's app will, and find out what a first version lets through: a parcel with no recipient accepted, an unknown number that makes the server crash. You turn it into an API that always returns the right code, 201, 200, 400 or 404, and keeps its internal errors for its logs. The first lab of the AWS path for developers, which prepares you for the AWS Certified Developer - Associate certification (DVA-C02).

    • No reviews yet
    • Intermediate
    • 2 h
    • 1,500 credits
  2. Step 2
    General

    Amazon S3, SQS and EventBridge: processing deliveries asynchronously

    At Sawa Express, a customer swears she never received her parcel, which the rider says he handed to her neighbor. Nobody can prove anything, and the company pays her back. Mireille wants a photo for every delivery, and a text message to the customer as soon as the parcel is delivered, without anyone at the office pressing a button. You build a chain that works on its own, in the background. The rider's app uploads the photo straight into a private Amazon S3 bucket, through a presigned URL. S3 triggers an AWS Lambda function that marks the parcel as delivered and publishes the event on an Amazon EventBridge bus. A rule routes it to an Amazon SQS queue, from which a second function sends the text message. Along the way, you meet what the exam asks about again and again: the event received twice, the event published before the rule exists, the mistyped number that fails over and over. You make every step idempotent, and you set failed messages aside in a dead-letter queue without blocking the others. The second lab of the AWS path for developers, which prepares you for the AWS Certified Developer - Associate certification (DVA-C02).

    • No reviews yet
    • Intermediate
    • 2 h
    • 2,000 credits
  3. Step 3
    General

    Containers on AWS: Docker, Amazon ECR and ECS Fargate

    Sawa Express is opening its Douala - Yaoundé line. Serge, a freelance developer, wrote the service that computes the rates: a small Python web server that runs perfectly on his laptop. But Serge has gone back to Bafoussam, and Patrick's app needs this service online, all the time. You put it in a container, as it is, without rewriting it. From AWS CloudShell, you build the image with Docker, publish it to a private Amazon ECR repository, and run it on Amazon ECS with AWS Fargate, with no server to manage. Along the way, you hit the two failures every developer meets when moving to containers: a service that responds on the laptop but not in the container, and a task that runs but that nobody can reach. Then the fuel price goes up: you change it with a new task revision, deployed with no downtime, without touching the code. The third lab of the AWS path for developers, which prepares you for the AWS Certified Developer - Associate certification (DVA-C02).

    • No reviews yet
    • Intermediate
    • 2 h
    • 2,000 credits
  4. Step 4
    General

    Securing an API: Amazon Cognito, JWT authorization, Secrets Manager and KMS

    A Sawa Express competitor posts a screenshot: a customer's name, phone number and address, read from the parcels API. Anyone can read any parcel, and even mark it delivered. And the SMS provider's key is written in the code. Patrick wants everything locked down before Monday. You create the customer and rider accounts in Amazon Cognito, and protect every API route with an API Gateway JWT authorizer: without a valid token, nothing gets through. In the function, you restrict status changes to riders, by reading their group in the token. Then you store the SMS key in AWS Secrets Manager, encrypted with an AWS KMS key, and find out the two permissions needed to read it: one on the secret, the other on the key. Finally, you open the API to the office's web dashboard, and to it alone, with CORS. The fourth lab of the AWS path for developers, which prepares you for the AWS Certified Developer - Associate certification (DVA-C02).

    • No reviews yet
    • Advanced
    • 2 h
    • 2,500 credits

AWS, AWS Certified and the associated badge are trademarks of Amazon.com, Inc. or its affiliates. MonPremierLab is not affiliated with AWS.