Hi I'm Nathan! 👋

I work as a senior developer advocate at AWS 🥑

You can chat with me on Twitter, or check my blog for interesting articles and videos

Here are some of my favorite open source sample applications I'm proud of:

I am also responsible for:

  • Awesome ECS: A curated list that helps folks who want to dive into the world of deploying containerized applications using Amazon ECS.
  • ecs-service-extensions: An AWS Cloud Development Kit module for constructing ECS services and extending them with features like service mesh and observability

67 items

Public facing, load balanced website on EC2

A Cloud Development Kit app showing advanced config for load balancing a public facing containerized application that is hosted on EC2 instances

AWS Cloud Development Kit (CDK)Infrastructure PatternEC2 Instances
Amazon Elastic Container Service February 2023 round up

The latest news and announcements about Amazon Elastic Container Service, for the month of February 2023

Video
Serverless API Gateway Ingress for AWS Fargate, in CloudFormation

CloudFormation templates to setup an AWS Fargate task with serverless API Gateway ingress

AWS CloudFormationAWS SAM CLIInfrastructure PatternAWS FargateAPI
Background worker that gets jobs from an SQS queue

Use AWS Copilot to deploy a serverless worker container in AWS Fargate that does jobs off an SQS queue.

AWS Copilot CLITutorialAWS FargateBackground Worker
Evenly balance a large ECS deployment across availability zones

How to use a capacity provider strategy to guarantee that containers are always evenly rebalanced across AZ's.

AWS CloudFormationInfrastructure PatternEC2 Instances
Basic container app with custom image build

A Cloud Development Kit app showing how to automatically build and upload local code as a container image when launching your application in AWS Fargate

AWS Cloud Development Kit (CDK)Infrastructure PatternAWS Fargate
Bun JavaScript container that uses AWS SDK to connect to DynamoDB

Build a Bun JavaScript container that runs in AWS Fargate via Amazon ECS, and uses AWS SDK to query a DynamoDB table

AWS CloudFormationAWS SAM CLIInfrastructure PatternAWS Fargate
Shared Application Load Balancer for multiple AWS Fargate services, in AWS Cloud Development Kit

An AWS Cloud Development Kit app showing how to share an ALB between multiple ECS services in AWS Fargate

AWS Cloud Development Kit (CDK)Infrastructure PatternAWS Fargate
Add durable storage to an ECS task, with Amazon Elastic File System

CloudFormation template showing how to mount an Elastic File System to a path inside of a container.

AWS CloudFormationInfrastructure PatternAmazon Elastic File System (EFS)ECS Exec
Enable ENI trunking for Amazon ECS, using a CloudFormation custom resource

CloudFormation custom resource that adjusts the ENI trunking setting for the EC2 role of Amazon ECS hosts.

AWS CloudFormationInfrastructure PatternEC2 Instances
A deep dive into Amazon ECS cost management

How to track container resource usage back to your AWS bill? Learn how to use ECS resource tags and AWS Cost and Usage billing report

Video
Deny Linux kernel capabilities for Amazon ECS and AWS Fargate tasks

Use policy as code to restrict Linux kernel capabilities for a container task

AWS CloudFormationPolicy as Code
Deny privileged container mode in Amazon ECS with CloudFormation Guard policy as code

Restrict the ability to launch ECS tasks in privileged mode, using policy as code.

AWS CloudFormationPolicy as Code
Deny root user for Amazon ECS and AWS Fargate tasks

Prevent container tasks from running as root on Amazon ECS and AWS Fargate

AWS CloudFormationPolicy as Code
Dual-stack IPv6 networking for Amazon ECS and AWS Fargate

Start rolling out IPv6 for your Fargate hosted service, while retaining IPv4 support as well.

AWS CloudFormationInfrastructure Pattern
Elastic Container Service (ECS) Blueprints for Terraform

A set of sample Terraform modules for deploying containers to AWS using Elastic Container Service

Terraform by HashiCorpInfrastructure PatternEC2 InstancesAWS Fargate
Amazon ECS cluster with isolated VPC and no NAT Gateway

Run an isolated ECS cluster with no internet access, only PrivateLink endpoints

AWS CloudFormationInfrastructure Pattern
Amazon ECS cluster on Bottlerocket Operating System

Launch an ECS cluster that uses Bottlerocket OS instances as capacity for running containers

AWS CloudFormationAWS SAM CLIInfrastructure PatternEC2 Instances
Amazon ECS Capacity Provider for EC2 instances

Production ready pattern for scaling EC2 capacity in an ECS cluster using an ECS Capacity Provider

AWS CloudFormationAWS SAM CLIInfrastructure PatternEC2 InstancesECS Capacity Provider
Amazon ECS task definition with a custom entrypoint command

How to run a custom command inside of a container image. How to override the default entrypoint, and pass custom parameters to the entrypoint.

AWS CloudFormationInfrastructure PatternBatch Job
Example IAM task execution roles for ECS and Fargate

IAM policies for the ECS task execution role. Guidance on ECS task execution best practices.

AWS CloudFormationInfrastructure Pattern
Container image signing and verification using AWS Signer for Amazon ECS and AWS Fargate

How to use AWS Signer to verify container images run using Amazon ECS and AWS Fargate

AWS CloudFormationAWS FargateTutorial
Load balanced web service deployed using AWS Copilot

Instructions for how to deploy a container to AWS Fargate using Amazon Elastic Container Service (ECS) and AWS Copilot

AWS Copilot CLIAWS FargateTutorial
Running GPU workloads with Amazon ECS and AWS Cloud Development Kit

A Cloud Development Kit demo app that shows how to run an application that depends on GPU resources.

AWS Cloud Development Kit (CDK)Infrastructure PatternEC2 InstancesMachine Learning
Service to service communication with AWS Copilot

How to use AWS Copilot to configure service to service communication using ECS Service Connect

AWS Copilot CLITutorialAWS FargateECS Service Connect
Deploy a CloudWatch dashboard for an Amazon ECS service

Create your own custom CloudWatch dashboard for an ECS service

AWS CloudFormationInfrastructure PatternCloudWatch Container Insights
Using ECS Service Extensions to attach a file system volume to a task

A service extension that attaches an Elastic File System (EFS) volume to a container running through ECS

AWS Cloud Development Kit (CDK)Infrastructure PatternAmazon Elastic File System (EFS)ECS Exec
Build a custom ECS Service Extension in CDK

How to build a reusable ECS configuration using the CDK package ECS Service Extensions

AWS Cloud Development Kit (CDK)Infrastructure Pattern
AWS FireLens with ECS Service Extensions

Use the ECS Service Extensions package for AWS Cloud Development Kit to easily add FireLens log routing to your container application

AWS Cloud Development Kit (CDK)Infrastructure PatternAWS FireLens
Load balanced container service with ECS Service Extensions

Use the ECS Service Extensions package for AWS Cloud Development Kit to deploy a simple load balanced web container.

AWS Cloud Development Kit (CDK)Infrastructure PatternWebsite
Amazon ECS cluster with EC2 Spot Capacity

CloudFormation template that demonstrates setting up an EC2 Spot capacity provider to supply compute for containers in the cluster

AWS CloudFormationAWS SAM CLIInfrastructure PatternEC2 InstancesECS Capacity Provider
Capture ECS task events into Amazon CloudWatch using Amazon EventBridge

How to persist ECS task events and telemetry in Amazon CloudWatch, so that you can view old task history and debug historical crashed tasks.

AWS CloudFormationInfrastructure PatternCloudWatch Container Insights
Launch a task with durable storage, using AWS Copilot

AWS Copilot manifest that defines an ECS task with a durable file system volume attached.

AWS Copilot CLIAWS FargateInfrastructure PatternAmazon Elastic File System (EFS)ECS Exec
Durable storage volume for AWS Fargate, using Cloud Development Kit (CDK)

This Cloud Development Kit (CDK) app shows how to attach an Elastic File System (EFS) to an application running in AWS Fargate

AWS Cloud Development Kit (CDK)AWS FargateInfrastructure PatternAmazon Elastic File System (EFS)ECS Exec
Enforce readonly root filesystem for containers in ECS, with CloudFormation Guard policy as code

Ensure that containers running via Amazon ECS have a readonly root filesystem that can not be mutated.

AWS CloudFormationPolicy as Code
Create new Elastic Container Service (ECS) task definition revision

A bash script example showing how to create a new revision of an ECS task definition, with variables for image URI, and other values.

AWS CLIScript
Inject configuration files in an Elastic Container Service (ECS) task definition

How to add custom config files to your container at runtime, by using a command override in the ECS task definition

AWS CloudFormationInfrastructure Pattern
Introduction to Amazon ECS

Amazon Elastic Container Service (Amazon ECS) is a fully managed orchestration service to help you easily manage containerized applications.

Video
Deploy Jupyter notebook container with Amazon ECS

How to use Amazon ECS and CloudFormation to run a Jupyter notebook container for training machine learning models

AWS CloudFormationAWS SAM CLIInfrastructure PatternEC2 InstancesMachine Learning
Large sized AWS VPC for an Amazon ECS cluster

Reusable CloudFormation pattern for deploying a large VPC capable of hosting thousands of container tasks, with internet access.

AWS CloudFormationInfrastructure Pattern
Low cost AWS VPC for an Amazon ECS cluster

Deploy a low cost VPC, with public subnets only.

AWS CloudFormationInfrastructure Pattern
NGINX reverse proxy sidecar for a web container hosted with Amazon ECS and AWS Fargate

How to run a sidecar NGINX reverse proxy to offload static file serving and protect your dynamic application code from bad traffic.

AWS CloudFormationAWS SAM CLIAWS FargateWebsiteInfrastructure Pattern
Network Load Balancer Ingress for Application Load Balancer fronted AWS Fargate service

An AWS Cloud Development Kit app showing how to load balance an AWS Fargate service with an internal ALB, while providing public ingress via NLB.

AWS Cloud Development Kit (CDK)Infrastructure PatternAWS Fargate
Dockerfile for a Node.js container on AWS Fargate with Amazon ECS

How to write a Dockerfile that runs a Node.js application

Tutorial
Enforce non-blocking mode for awslogs logging driver, with CloudFormation Guard policy as code

Ensure that applications stay online, with limited log loss, by using CloudFormation Guard policy as code to enforce non-blocking logging mode.

AWS CloudFormationPolicy as Code
Public facing API hosted on EC2 instances

A containerized public facing API in a private network, managed by EC2, hosted on EC2 capacity.

AWS CloudFormationAWS SAM CLIAPIEC2 InstancesInfrastructure Pattern
Serverless public facing API hosted on AWS Fargate

A serverless, containerized public facing API in a private network, managed by ECS, hosted on AWS Fargate

AWS CloudFormationAWS SAM CLIAPIAWS FargateInfrastructure Pattern
Public facing website hosted on EC2 instances

A containerized website, hosted as a public facing service, managed by EC2, hosted on EC2 capacity.

AWS CloudFormationAWS SAM CLIWebsiteEC2 InstancesInfrastructure Pattern
Serverless public facing website hosted on AWS Fargate

A containerized website, hosted as a public facing service, managed by ECS, hosted on serverless AWS Fargate capacity

AWS CloudFormationAWS SAM CLIWebsiteAWS FargateInfrastructure Pattern
Use Pulumi Crosswalk to automate container image builds

How to use Pulumi infrastructure as code SDK to automate building a container image

Pulumi IaCInfrastructure Pattern
Use Pulumi Crosswalk to setup an ECS Service in a VPC

How to use Pulumi infrastructure as code SDK to deploy a load balanced ECS service in a VPC

Pulumi IaCInfrastructure Pattern
Use Pulumi Crosswalk to deploy a basic load balanced ECS service

How to use Pulumi infrastructure as code SDK to deploy a load balanced ECS service

Pulumi IaCInfrastructure Pattern
Register ECS Anywhere Linux Capacity

Command line scripts for registering external Linux instances with an ECS Cluster

AWS CLIScriptECS Anywhere
Register ECS Anywhere Windows Capacity

Command line scripts for registering external Windows instances with an ECS Cluster

AWS CLIScriptECS Anywhere
Build, tag, and release a container image to production with Amazon ECS

Best practices for building, tagging, and releasing a container image using task definition revisions for Amazon ECS.

Script
Step scaling policy for ECS service based on CPU consumption

CloudFormation for automatically scaling an ECS service up and down based on CPU usage

AWS CloudFormationInfrastructure Pattern
Schedule a containerized cron job using Amazon ECS and AWS Copilot

Setup a background batch job on a cron schedule. It will be run in AWS Fargate by Amazon ECS. Pattern is setup using AWS Copilot.

AWS Copilot CLITutorialAWS FargateBatch Job
Service Discovery for AWS Fargate tasks with AWS Cloud Map

How to setup service discovery in ECS, so that microservices can communicate with each other.

AWS CloudFormationAWS SAM CLIAWS Cloud MapInfrastructure PatternAWS Fargate
Split web traffic between Amazon EC2 and AWS Fargate

CloudFormation example of how to setup an Application Load Balancer that distributes web traffic across an ECS service running on both EC2 and Fargate.

AWS CloudFormationInfrastructure PatternEC2 InstancesAWS Fargate
Use target tracking to scale container deployments with Amazon ECS

Create a target tracking scaling policy with CloudFormation, to scale a service based on resource utilization.

AWS CloudFormationInfrastructure Pattern
Amazon ECS task definition across both EC2 and AWS Fargate

How to make a task definition that can deploy the same container either as a serverless application on AWS Fargate or hosted on EC2 instance capacity

AWS CloudFormationInfrastructure PatternEC2 InstancesAWS Fargate
ECS Task Execution IAM Role for Elastic File System (EFS)

ECS task execution IAM role that allows mounting an Elastic File System (EFS)

AWS CloudFormationInfrastructure PatternAmazon Elastic File System (EFS)
ECS Task Execution IAM Role for AWS Secrets Manager

ECS task execution IAM role that allows attaching a secrets to an ECS task

AWS CloudFormationInfrastructure Pattern
Uninstall ECS Anywhere

A bash script that cleans up a host that was used as capacity for ECS Anywhere

AWS CLIScriptECS Anywhere
Explore file system contents of a container image locally

CLI commands to explore the contents of a local Docker image

Script
Internal worker or background service hosted on EC2 instances

A containerized worker or internal service, in a private network, managed by EC2, hosted on EC2 capacity.

AWS CloudFormationAWS SAM CLIBackground WorkerEC2 InstancesInfrastructure Pattern
Workshop: Serverless First on AWS

Compare three ways of running serverless containers by deploying a chat application that uses AWS Lambda, AWS Fargate, and AWS App Runner

AWS CloudFormationWorkshopAWS FargateWebsite