[BETA] Deploying to AWS

WARNING! This is a new sub-generator, of BETA quality. Use it at your own risk! Feedback is highly welcome!

WARNING! Amazon does not provide a free tier, and does not sponsor JHipster. As such, we cannot test this sub-generator, and cannot garantee that it works correctly. If you want us to be able to test this generator, you can consider sponsoring the project.

This sub-generator allows to deploy automatically your JHipster application to the Amazon AWS cloud.

Limitations

  • You can only use it with a MySQL database (PostgreSQL and Oracle will following later).
  • Websockets doesn't work behind the load balancer by default.

Running the sub-generator

Before running the sub-generator, you need to go the JHipster Generator directory, and install the AWS-SDK with some other dependencies.

Under Windows following these Steps:

cd %USERPROFILE%\AppData\Roaming\npm\node_modules\generator-jhipster
npm install aws-sdk progress node-uuid

and under Mac/Linux following these Steps:

cd cd /usr/local/lib/node_modules/generator-jhipster # Path to globally installed node modules
npm install aws-sdk progress node-uuid

Then log in with your Amazon AWS account and create a user for your JHipster application. To grant this user the required permissions attach the AWSElasticBeanstalkFullAccess policy.

After that create a credentials file at ~/.aws/credentials on Mac/Linux or C:\Users\USERNAME\.aws\credentials on Windows.

[default]
aws_access_key_id = your_access_key
aws_secret_access_key = your_secret_key

To deploy your application to Amazon AWS, type:

yo jhipster:aws

This should package your application in "production" mode, create an Bean Stalk application (with a Postgresql database), upload your code, and start the application.

Updating your deployed application

When your application is already deployed, you can re-deploy it by run the sub-generator again:

yo jhipster:aws

The subgenerator ask your database credentials again but they will be ignored during the update.

More information