COURSE

TypeScript for AWS Serverless

Learn how to develop AWS serverless application in TypeScript in this 3-day, intensive workshop.

  • 3 Days
  • Intermediate
  • In-person / Online
  • £ On Request

Your team will learn...

Develop confidence in all core TypeScript features

Become comfortable with advanced Typescript concepts such as ADTs

Leverage TypeScript for deploying AWS services via the CDK

Write clean CDK code that removes redundancies and introduces patterns

Gain experience writing AWS Lambdas using the AWS SDK via TypeScript

Learn how to test both your CDK and Lambda code

Overview

Prefer Python? Check out our Python for AWS Serverless course.

Serverless architectures are the evolution of Platform as a Service (PaaS). With serverless, you give up specification of infrastructure concerns, instead the service allocates resources as required. Code (and servers) are only used when required to handle specific requests and events. This simplifies deployment whilst reducing costs, since you only pay for what you use. AWS provides a range of services for building serverless architectures.

TypeScript is a type safe superset of JavaScript that allows us to write clean, simple code that runs anywhere JavaScript does. As a superset of JavaScript, all JavaScript skills and legacy code are readily reusable. Type safety brings many benefits, including catching bugs at compile time instead of run time, advanced static analysis tooling, powerful refactorings and better IDE experience.

TypeScript is an excellent choice for building serverless applications on AWS. We can implement our serverless functions in TypeScript to get all the benefits that strong, static typing brings, as well as excellent start times, which is especially important for serverless. But serverless is not just AWS Lambda, we will have systems and services that use lots of AWS resources. We can also leverage TypeScript to write our deployment scripts in code via the AWS Cloud Development Kit (CDK). This gives us the powerful tooling of modern IDEs with static typing as well as the power of general purpose programming to implement and reuse patterns and remove redundancy. This is a step change compared to YAML Cloudformation templates.

In this course, you'll move step by step to learn everything you need to know to build Serverless Applications in TypeScript on AWS.

You will need a good understanding of TypeScript, and we can include additional TypeScript modules if required. We can work with your team to ensure we only teach what is necessary - teaching TypeScript from scratch or only the advanced topics. Then we'll work with the CDK to deploy your first Lambda and gradually introduce more and more services to build larger and larger applications using services like API Gateway, S3, CloudFront, DynamoDB and more. Along the way, you'll learn how to test this code as well.

Outline

TypeScript Fundamentals (Optional)

  • The difference between the TypeScript compiler and Babel
  • Setting up a build environment with Webpack
  • Configuring TypeScript via tsconfig.json
  • Decoding the transpiled output
  • Core types in TypeScript
  • The difference between Casting and Type Assertions
  • TypeScript as a superset of Modern JavaScript
  • Using function types and higher order functions
  • How function overloading works in TypeScript
  • Numeric, String and const enumerations
  • The TypeScript class model in depth
  • Access modifiers and support for JavaScript private
  • Support for generic types and constraints

Advanced TypeScript (Optional)

  • Advanced features of TS interfaces
  • The difference between object literals and type literals
  • Using string and number literals as Types
  • Type Aliases, Unions and Intersections
  • Smart Casting and Type Guards
  • Defining mapped types and the infer keyword
  • Utility types and type programming
  • ts-toolbelt and utility-types
  • Using class Decorators
  • Understanding Symbols
  • Generator functions
  • Writing asynchronous TypeScript

Introduction to AWS and the Cloud

  • Why and how the cloud evolved
  • The benefits of the cloud
  • IaaS vs PaaS vs SaaS
  • Where serverless fits in
  • Why choose Amazon Web Services?
  • The Shared Responsibility Model
  • Using the AWS CLI

The Cloud Development Kit (CDK)

  • Cloudformation Service and Templates
  • The limits of YAML and potential of code
  • Introduction to the CDK
  • Comparison with SAM
  • Writing CDK Apps in TypeScript
  • Using the CDK CLI
  • Stacks, Constructs, Patterns and Composition
  • Refactoring CDK code and using custom constructs
  • AWS Solutions Constructs
  • Testing CDK Code

AWS Lambda

  • Introducing serverless functions
  • AWS Lambda Triggers and Events
  • AWS Lambda Pricing Model
  • AWS Lambda Limitations
  • Cold Start vs Warm Start
  • Writing AWS Lambdas in TypeScript
  • Packaging TypeScript for deployment
  • The AWS SDK for TypeScript
  • State and optimisation considerations
  • Asynchronous considerations
  • Unit Testing AWS Lambdas locally
  • Testing AWS Lambdas locally via SAM

Leveraging Other AWS Services

  • Amazon API Gateway
  • Amazon S3
  • Amazon DynamoDB
  • Amazon CloudFront
  • Amazon SQS
  • Amazon SAM
  • Amazon Cognito
  • Amazon AppSync
  • Amazon Amplify

Requirements

Delegates will need to fully understand TypeScript, which can be taught on this delivery. We can teach from beginner to advanced level and can tailor the course based on your prior knowledge and experience. An active AWS account is required, although one can be provided for an additional fee.

COURSE

TypeScript for AWS Serverless

Learn how to develop AWS serverless application in TypeScript in this 3-day, intensive workshop.

  • 3 Days
  • Intermediate
  • In-person / Online
  • £ On Request

Deloitte logo
Atlassian logo
Bose logo
Workday logo
BMW logo
Amex logo
McAfee logo
PWC logo