Coder Social home page Coder Social logo

aws-refapp's Introduction

Spring Cloud AWS Reference App

This reference application acts as a showcase for the features provided by [Spring Cloud AWS] Spring-Cloud-AWS.

To check out the project and build it from source, do the following:

git clone https://github.com/spring-cloud-samples/aws-refapp.git
cd aws-refapp
mvn package

Run it on your own AWS environment

If you want to start this application on your own AWS environment you just need to do the following steps:

  • Choose Ireland as region
  • Go to the CloudFormation console.
  • Create a new stack
    • Name the stack "AwsSampleStack".
    • Choose "Upload a template to Amazon S3".
    • Upload the AwsSampleStack.template file (located at the root of this project).
    • When prompted for a parameter value rdsPassword just type a password of your choice with a min length of 8 characters.

The stack needs a while to start (around 15 to 20 minutes). Once it is complete, you can copy the public DNS address of the created EC2 instance and open it in your browser with port 8080. For example http://ec2-54-72-102-202.eu-west-1.compute.amazonaws.com:8080.

Running the application locally

Please note that you need a running stack on AWS to run it locally!

If you want to play around with the application, you can start it locally on your machine. In order to start the application you have to create a configuration file that configures the necessary parameters to connect to the environment.

Please create a new properties file (for example access.properties). This file must contain three properties named accessKey,secretKey and rdsPassword. These two properties accessKey and secretKey are account/user specific and should never be shared to anyone. To retrieve these settings you have to open your account inside the AWS console and retrieve them through the [Security Credentials Page] AWS-Security-Credentials.

Note: In general we recommend that you use an [Amazon IAM] Amazon-IAM user instead of the account itself. The last password rdsPassword is used to access the database inside the integration tests. This password has a minimum length of 8 characters.

An example file would look like this

cloud.aws.credentials.accessKey=ilaugsjdlkahgsdlaksdhg
cloud.aws.credentials.secretKey=aöksjdhöadjs,höalsdhjköalsdjhasd+
cloud.aws.region.static=EU_WEST_1
cloud.aws.stack.name=AwsSampleStack
cloud.aws.rds.RdsInstance.password=someVerySecretPassword

Once you created the properties file you can start the application using the following command:

mvn spring-boot:run -Drun.arguments="--spring.config.location=/path/to/your/properties/file,--spring.profiles.active=local"

Note: There are multiple ways to start a Spring Boot application, please refer to the [Spring Boot documentation] Run-Spring-Boot to see all the possibilities.

aws-refapp's People

Contributors

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