Introduction to AWS Proton for Container and Serverless Deployments

Christopher Adamson
4 min readJan 6, 2024

AWS Proton is a service that makes it easier to provision, deploy, and manage containerized and serverless applications. With Proton, you can define your application architecture once and then provision environments in different AWS accounts and regions. Proton handles all the underlying infrastructure provisioning and deployments for you.

In this tutorial, we will cover the basics of using Proton to deploy a containerized application and a serverless application.

Prerequisites

  • An AWS account
  • AWS CLI installed and configured
  • Docker installed locally

Creating a Proton Service

Proton uses a YAML file called the service template to define your application architecture. This includes your containers, serverless functions, and any AWS resources they require.

Here is a sample service template for a containerized application:

This defines an ECS cluster running a Fargate service with a load balancer. The service runs a single container based on the provided Docker image.

To create the service in Proton:

Proton will create the service and you can view its status.

Next let’s look at a serverless setup.

Creating a Serverless Service

Here is a sample service template for a serverless application with Lambda functions and an API Gateway REST API:

This sets up a REST API, Lambda function, and S3 website.

Deploy it similarly:

Now we have both a containerized service and serverless application set up in Proton!

Deploying Service Updates

To deploy changes to your services, you update the template with your changes and run:

Proton handles deploying the changes across the environment in a rolling fashion.

AWS CLI Commands for Proton

Here are some example AWS CLI commands for working with AWS Proton:

Validate a service template:

Create a new Proton service:

Update an existing service:

Deploy the latest template to an environment:

Get service info:

List Proton environments:

Get environment info:

Conclusion

AWS Proton makes it easy to deploy containerized and serverless applications by handling all the underlying infrastructure provisioning, permissions, and deployments.

Using Proton’s infrastructure as code service templates, you can define your architecture once and deploy it to multiple environments and accounts. Proton will handle creating the resources, deploying your containers and functions, managing rollouts, and monitoring.

Key benefits of Proton include simplified infrastructure management, consistent deployments, built-in observability, and streamlined IAM permissions. Proton reduces the overhead of deploying container and serverless apps on AWS so you can focus on your code and business logic.

This tutorial covered the basics of creating Proton service templates for containers and serverless apps, deploying updates, and using the AWS CLI. Check the Proton documentation for more details on features like pipeline integration, monitoring, and cross-account deployments.

--

--