AWS proton is an application deployment service that brings together infrastructure as code, CI-CD, and observability tools into a single interface for developers to go from code in a repo to a running micro-service on their AWS infrastructure.
AWS Proton helps automate infrastructure provisioning and deployments of serverless, container-based applications.
Who shall use Proton?
Proton is used by Platform/Infrastructure teams and Developers both.
Platform Teams/Administrators: Define and track the infrastructure that will be used by deployed services. Platform teams create:
Environment Templates: Templates defining shared resources (to be used by multiple applications) for different deployment environment (staging, development, production, etc). Service Templates: Templates defining infrastructure, monitoring and CI/CD resources for different compatible environment templates. Developers: Select one of the service templates, link the source-code repo and trigger deployment of their projects.
Proton deploys and manages the service instances (created from the selected service template).
Deployments and other actions including
Delete services, and
Update service pipeline, which can be done either using Proton Console or AWS CLI.
Development and Deployment
Let's create and deploy a service.
Create Service Role
A service role is an AWS Identity and Access Management (IAM) role that allows AWS Proton to make calls to resources on your behalf. Setup the service role before creating and deploying the service by referring to the AWS documentation here.
Creating an Environment template: In the proton console, go to Template > Environment Templates using the side-bar and create one. AWS provides its own template bundles to try out. Template bundles contain all of the information Proton needs to deploy environments and services.
Once the environment template is created, publish the template's 1.0 (minor) version.
Creating a Service template: Go to Template > Service Templates, click Create a Service template, select the appropriate environment template created earlier (in this case, Staging Environment) and publish the template's 1.0 (minor) version.
Proton provides support to maintain major and minor versions of the templates.
Creating an Environment Instance: In the Environments section, click Create Environment, select the Environment template created earlier (in this case, Staging Environment) and enter the environment instance details.
Creating A Service instance: Switch to the Services section and click Create Service. Proton provides the option to add up to 6 instances at a time. Mention the repository and branch to be linked.
Note: Connect Github/other versioning tools with AWS prior to this step.
Proton will deploy the service and the pipeline will be built.
Once the status of the service and the pipeline changes to deployed, the deployed app and pipeline outputs will become accessible on generated endpoints.
Changes and Pipeline
On making any new change to the
main branch (or branch specified during setup), the pipeline is auto-triggered and new a build deployment is initiated. We can access the status of the triggered pipeline on the service detail page.
Things I liked From The Platform Team's Perspective
- Proton provides good support to maintain and version different templates.
- The pipeline outputs are detailed and comprehensible.
- Proton groups and provides easy-to-review logs for each pipeline stage.
Things I liked From The Developer's Perspective
- Getting an app live is pretty simple and straightforward for developers.
- One can select from the application templates made available to them and add the configuration parameters for the service. The apps can be deployed in a self-service fashion.
- Proton automatically provisions the resources, configures the CI/CD and deploys the code into the defined infrastructure.
- Developers can access the general status of the app, the CI/CD pipeline, observability tools and source control for each.
Proton is available at no additional cost. Only the AWS resources created to store and run the application are billed.
Proton aims at enabling small teams to manage, micro-services based deployments at scale and is promising in terms of automation of infrastructure provisioning and abstracting the deployments. It'll be worth noting what new technology support Proton introduces in the future.