GithubHelp home page GithubHelp logo

rimironenko / aws-serverless-sam-app Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 12.0 117 KB

An AWS SAM application that implements a CRUD API with Lambda handlers written in Java.

License: MIT License

Makefile 2.05% Java 95.05% Shell 2.91%
aws aws-sam aws-lambda-java aws-lambda-layer aws-sam-pipeline aws-codepipeline serverless lambda aws-lambda

aws-serverless-sam-app's Introduction

aws-serverless-sam-app

About the application

It is an AWS SAM application that implements a CRUD API with Lambda handlers written in Java.

The architecture of the application is in the picture given below.

Architecture

Please find the detailed description of this application in my Medium blog post: AWS SAM for a serverless Java application

Prerequisites

  • Java 1.8+
  • Apache Maven
  • AWS CLI is installed and configured
  • AWS SAM CLI

Project structure

  • template.yaml - The AWS SAM template, a descriptor of an AWS SAM application
  • codepipeline.yaml - The AWS SAM Pipelines template, a CloudFormation template with definition of the AWS infrastructure for the automated Ci/CD
  • lambda-layer - The Lambda Layer module that contains all the dependencies required for the Lambda functions
  • item-service-core - The Maven module that contains the common code of the Lambda functions. Is embedded into the layer as a Maven dependency
  • get-item-service - The Lambda function which implements the READ operation for the CRUD API
  • put-item-service - The Lambda function which implements the CREATE operation for the CRUD API
  • update-item-service - The Lambda function which implements the UPDATE operation for the CRUD API
  • delete-item-service - The Lambda function which implements the DELETE operation for the CRUD API
  • pipeline - The folder that contains the specifications for AWS SAM Pipelines that are used for the automated CI/CD
  • assume-role.sh - The Bash script that is used for the automated CI/CD

Build and deployment

To build and deploy with AWS SAM and Maven, please execute the sequence of the commands given below:

- cd item-service-core/
- mvn install
- cd ../lambda-layer/
- mvn install
- cd ..
- sam build 
- sam deploy --guided

Connect your Git repository with the AWS CodePipeline

To connect your own Git repository with the AWS CodePiepline pipeline that is created from the codepipeline.yaml file, please use the command given below:

sam deploy -t codepipeline.yaml --stack-name <give-a-pipeline-stack-name> --capabilities=CAPABILITY_IAM

aws-serverless-sam-app's People

Contributors

rimironenko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.