
Learn the fundamentals of serverless full-stack development by building a real-world translator app from scratch using AWS CDK, AWS SDK, Next.js, and TypeScript.
Set up a Linux development environment on Ubuntu 22.04 LTS by updating packages, installing nvm and node 20.11, then installing AWS CDK, AWS CLI, and VS Code.
Create and configure an AWS account, set up an admin IAM user, enable MFA, generate access keys, configure the AWS CLI, and bootstrap CDK with CloudFormation.
Create a simple CDK project, synthesize to a CloudFormation template, deploy a temp stack, then destroy it and learn bucket removal policies in S3.
Explore creating an S3 bucket via the AWS console to mirror CDK behavior, compare console versus code, and understand versioning, object ownership, and unique naming concerns.
Explore CDK concepts like stacks, constructs, and apps, and learn to organize resources with custom storage, image galleries, and multiple stacks deployed via CDK deploy.
Explore how AWS API gateway provides a fully managed front door for scalable rest APIs, with versioning, caching, and Lambda integration via CDK.
Explore front-end architectures with Next.js and React, covering SSR, SSG, SPA, and hybrids, and learn to build a Next.js front end using Tailwind CSS and a monorepo setup.
Explore monorepo solutions to unify front end and CDK stack, enable shared types and libraries, and streamline npm workspaces setup for coherent deploy and test workflows.
Create a shareable types package in a monorepo, exporting translate request and response types for both frontend and lambda, and integrate with npm and TypeScript for safer serverless development.
Learn to set up and integrate a DynamoDB NoSQL table in CDK, including defining a translations table with a request ID partition key and granting Lambda read and write access.
Install and configure the DynamoDB SDK in a TypeScript lambda, pass the translation table name via environment variables, and save translations using marshal and the AWS request ID.
Define and attach a targeted policy to grant translate text access for the Lambda, restrict DynamoDB actions, and illustrate deployment via CDK and CloudFormation.
Fetch translations from the database by adding a get translations lambda and rest API, then display the translation objects on the frontend.
Refactor lambda functionality into modular layers to organize code and reduce deployment size, enabling reuse across functions. Explore an example with file writer, image processing, and cdK packaging into /opt.
Create a reusable utils lambda layer to consolidate repeated lambda logic, implement gateway response wrappers, configure tsconfig paths, and build with a NodeJS output for AWS lambda integration.
Configure a shared tsconfig across lambda and layer, map paths to the lambda layer in opt/nodejs, and extend base tsconfig for streamlined deployment of lambda layers with cdk.
Learn to integrate a lambda layer with CDK by defining the layer, linking it to multiple lambdas, configuring paths and runtimes, deploying, and testing for modular code.
Move the translation call into a dedicated lambda layer to enable reuse, portability, and separation of concerns across a serverless fullstack with AWS CDK Next.js and TypeScript.
Exclude external modules from bundling by configuring bundling with an external modules array and a path to the lambda layer to reduce deployment size.
Configure a CloudFront web distribution to serve an S3-hosted app, using CDK to set the origin, default behavior, and cache invalidation, then deploy and view the generated web URL.
Configure a custom domain for your serverless site by provisioning a certificate with Route 53 and ACM, updating the deployment region, and mapping the domain to a CloudFront distribution.
Set up a domain for rest API with api.example.com, add API URL to the certificate’s alternative names, and configure Route 53 to route to the API gateway; deploy and test.
Refactor the CDK code to improve readability and maintainability, using separation of concerns by splitting into focused files for reuse, and prepare for future lambda-driven logic and stage-based certificate decisions.
Refactor the CDK project into clean Rest API and translation service constructs, reorganize sources, and prepare for authentication, while updating routes, certificates, and Route53 before deployment.
Create and populate a dot env file, read its variables in CDK, and wire account id, region, domain, and subdomains into the project for deployment.
Refactor the project to use a centralized app paths helper that detects the project root env file, replacing relative paths and reducing complexity.
Refactor the lambda wrapper to unify creation, minify code, and externalize layers, reducing bundle size and speeding deployment.
This comprehensive class will teach you the fundamentals of serverless full-stack development by building a real-world web application, from scratch. Throughout the lessons, you'll gain practical experience in creating a fully-functional application while following best coding practices, resulting in a high-quality codebase that you can reuse or reference for your future projects.
The class will cover AWS Cloud services, and you'll learn how to leverage AWS CDK to write infrastructure as code (IaC) and AWS SDK libraries to interact with various AWS services. For the frontend, you'll dive into the popular NextJS framework, which is based on React. The entire project will be developed using TypeScript, and we will be using NPM workspaces to create a Mono-repo for the project in order to package all the elements into a single NPM package, ensuring a robust and maintainable codebase.
By the end of the class, you'll have the necessary knowledge and skills to convert your ideas into working products. Whether you're a solo developer looking to turn ideas into reality, new to serverless or AWS Cloud services, a DevOps professional seeking hands-on experience with AWS CDK, or a complete beginner aspiring to become a serverless full-stack developer, this class offers a comprehensive and practical learning experience.