Giter Site home page Giter Site logo

aws-demo's Introduction

mvn package

This command should generate a aws-demo-1.0-SNAPSHOT.jar in the target folder. 
Now that we have generated the jar file, we can use the AWS CLI to package the template for deployment.

You will need an S3 bucket to store the artifacts for deployment. Once you have created the S3 bucket, run the following command :

--------------------------------------------------------------------------------------------------------------------------------
$ aws cloudformation package --template-file sam.yaml --output-template-file output-sam.yaml --s3-bucket <YOUR S3 BUCKET NAME>
Uploading to xxxxxxxxxxxxxxxxxxxxxxxxxx  6464692 / 6464692.0  (100.00%)
Successfully packaged artifacts and wrote output template to file output-sam.yaml.
Execute the following command to deploy the packaged template
aws cloudformation deploy --template-file /your/path/output-sam.yaml --stack-name <YOUR STACK NAME>
--------------------------------------------------------------------------------------------------------------------------------

As the command output suggests, you can now use the cli to deploy the application. Choose a stack name and run the aws cloudformation deploy command from the output of the package command.

--------------------------------------------------------------------------------------------------------------------------------
$ aws cloudformation deploy --template-file output-sam.yaml --stack-name ServerlessSpringBootSample --capabilities CAPABILITY_IAM
--------------------------------------------------------------------------------------------------------------------------------

Once the application is deployed, you can describe the stack to show the API endpoint that was created. 

--------------------------------------------------------------------------------------------------------------------------------
$ aws cloudformation describe-stacks --stack-name ServerlessSpringBootSample
--------------------------------------------------------------------------------------------------------------------------------

Copy the OutputValue into a browser to test a first request.
e.g.: "OutputValue": "https://xxxxxxx.execute-api.us-west-2.amazonaws.com/Prod/XXX"

aws-demo's People

Contributors

anavulla avatar

Watchers

James Cloos 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.