Introduction to AWS proton
Tags: cloud, awsproton, aws
Published: 2023-11-24 10:16:04

### Overview of AWS Proton

AWS Proton is a new service that was introduced at re: invent 2020. AWS proton is a platform for developers to be able to create deployment templates for serverless and containerized applications.

**Benefits of using AWS Proton**

1. Proton provides a self-service web interface that allows users to quickly find and deploy the most recent templates directly from the AWS console.
2. Developers can connect to the repository and can deploy with minimal effort by using the preconfigured service templates and environments.
3. Proton can be used by multiple teams when working on a project, the Administrator is able to create and update stacks on behalf of developer teams, helping the developer team to focus on building their application.
4. Proton can fully automate the end-to-end application deployments with the required infrastructure such as databases and load balancers.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/15ldym7d85het1yjblw0.png)

Looking at the overview shows the involvement of templates and environments of staging, production, and development. We will go through each stage as follows;

**Stage 1:** The administrator creates an Environment template, this template defines the resource sharing

**Stage 2:** From the Environment template, AWS proton deploys one or more environments that contain the staging, production, and development cycle.

**Stage 3:** The administrator creates and registers a service template with AWS Proton, and it structures  the bedrock of the infrastructure, monitoring and CI/CD resources with the compatible Environment Templates

**Stage 4:** The developer makes use of the service template and connects to the source code repository

Stage 5: AWS Proton deploys the service with CI/CD pipeline for your service instances.

Stage 6: AWS Proton deploys and manages the service and service instances that are running the Source code which was defined in the service template.

A service instance is an instantiation of the selected service template in an environment for a single stage of a pipeline.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zzorgv2rsax3r6g5869x.png)
**The figure above shows the AWS Proton WorkFlow**

Proton can also provide you with an expert CI/CD pipeline dependent on the service template created. Environment templates allow teams to reuse pipelines to deploy the same application into the production, staging, and development stage, which is why Proton is efficient.

### Working with AWS Proton

Firstly we need to open the AWS Proton Service in the AWS console and click on get started.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yyj8wa7q7qopfe7izaqa.png)

In the getting started page, you choose either create an environment template or create a service template depending on the template you want to create. But for this project, I chose the "create a service template" option.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rapwnqp7w8loafnytgew.png)

Once open, you choose the template option to create a template for provisioning new environments.

I chose "Use one of our sample template bundles" and "fargate-environment" option at this point. So it will create a VPC, S3 bucket, codepipeline, and a IAM Role for EC2 instance.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uzuy16jfq3rui62fw78r.png)

Also, create a service. To automatically provision the CI/CD pipeline, the proton connects to the repository source code in the service repository settings.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rg1rt8gx29uf61r9irwy.png)

You create a service instance in configure custom settings. Follow the prompt by entering the instance name, choose the environment for your instance parameters, and create and view your service status and details.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/463mqpv40d85o2ihfo1n.png)

When the service is active, in the overview tab, in the service instance section, choose the name of your service.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bq2d4p8wejy5j892eq1g.png)

To view your application build, deploy stage, in the output section, copy the Pipeline Endpoint.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gl1jm6uyco2hlyt6qeql.png)

In this deploy, the following resources are created by AWS:

Iam Role, EC2 Instance, CI/CD Codepipeline, ECS Fargate, S3 Bucket.

### Conclusion

This project gives an overview and insight on the usefulness of AWS Proton in regards to creating a reusable Environment Template and a Service Template both for Development teams and Administrator Teams.