GithubHelp home page GithubHelp logo

rimironenko / aws-serverless-proton-project Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 3.0 83 KB

A configuration of an AWS Proton environment and an AWS Proton service for Lambda functions. The environment and services provision and configure a serverless CRUD API with Lambda handlers that can have different runtimes.

License: MIT License

aws aws-lambda serverless proton aws-proton cloudformation

aws-serverless-proton-project's Introduction

AWS Proton

Proton is an AWS service that is aimed at infrastructure as code and uses CloudFormation, but its major difference to other services is decoupling of infrastructure and code. Proton introduces two entities in its setup:

  • Service. It is an AWS resource or set of resources that usually focused on business logic and contain custom developer code. Any repeatable item in an AWS application can be considered as a Proton service instance (e.g. Lambda handler in multi-lambda environment or Fargate containers in microservices architecture). In addition to infrastructure, the Proton service instance may have its own CodeDeploy pipeline and webhook established during the creation of a service instance, so custom code will be automatically built and deployed to a service instance. Proton service instances can be created only inside a Proton environment.
  • Environment. It is a set of shared resources and policies which are shared across service instances that are created in this environment (common DB, API Gateway, VPC, etc.).

Both Service and Environment are created from Proton templates โ€” it is a proton-specific file structure that uses CloudFormation to define resources for an environment (environment template), service (service template), and code pipeline for service (optional, included into service template). Both Service and Environment can consume arguments from custom parameters which can be defined in a template (similar to CloudFormation parameters) and this is how several instances with small differences can be created from a single template.

About this project

Please find the detailed description at my Medium blog post

This repository represents Proton configuration to establish the following simple Serverless architecture:

  • Dynamo DB Table
  • Lambda handlers
  • API Gateway

Architecture diagram

Lambda handlers are attached to API Gateway (AWS_PROXY integration) and can interact with Dynamo DB.

As Proton entities, resources above are grouped as:

  • Proton Environment: Dynamo DB and API Gateway. It is a shared infrastructure which can be created from Proton Environment Template ("environment" folder).
  • Proton Service: Lambda handlers. It is handlers created from Proton Service template ("lambda-service" folder) which work inbetween API Gateway and Dynamo DB in a particular environemnt.

Build

To create Proton Environment template, create a tar.gz archive with content of "environment" folder:

tar -cvzf my-proton-environment-template.tar.gz environment/

To create Proton Service template, create a tar.gz archive with content of "lambda-service" folder:

tar -cvzf my-lambda-service-template.tar.gz lambda-service/

Use both archives to create Proton Environemnt and Services via console or CLI. Read how to create both at https://docs.aws.amazon.com/proton/latest/adminguide/ag-getting-started-console.html and https://docs.aws.amazon.com/proton/latest/userguide/ug-get-started-console.html

License

This library is licensed under the MIT-0 License. See the LICENSE file.

aws-serverless-proton-project's People

Contributors

rimironenko avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.