Deploy an application built to connect to SAP HANA, express edition, on AWS Elastic Beanstalk.

You will learn

This tutorial will guide you through the process of deploying a sample HANA, express edition application to AWS Elastic Beanstalk. The tutorial assumes that you already have your application running in a local environment and simply need to port it to AWS Elastic Beanstalk. You will only need to complete the accordion steps of the platforms you wish to deploy to.

This command may prompt for AWS access id and AWS secret key. For first time user, you may need to set it up for logging into the AWS account. Search for access keys & try to create an access key. Save the csv output once the keys get generated. Substitute the environment name of your choice (e.g. hxeapp-env).
% eb create <Your environment>
Output will be similar to the following:
Creating application version archive "app-170519_155200".
Uploading hxeapp/app-170519_155200.zip to S3. This may take a while.
Upload Complete.
...
INFO: Successfully launched environment: hxeapp-dev

Deploy the Node application on AWS in the development space.
% eb deploy <Your environment>
Output will be similar to the following:
Creating application version archive "app-170519_160131".
Uploading hxeapp/app-170519_160131.zip to S3. This may take a while.
Upload Complete.
INFO: Environment update is starting.
INFO: Deploying new version to instance(s).
INFO: New application version was deployed to running EC2 instances.
INFO: Environment update completed successfully.

Open the Node application deployed on AWS.
% eb open
This opens the URL to where the application is deployed. You can also login to the AWS console Elastic Beanstalk service

Navigate to the default region (e.g. “us-west-2”) where you have initialized your application. Notice already exists in the location. If it does not exist, you are at a wrong region. Click on the URL for the app (something like the following):
http://hxeapp-dev.2tmfx3b2bn.us-west-2.elasticbeanstalk.com/

Because the HANA Go database driver is not part of the Go Standard library, you need to tell AWS Elastic Beanstalk how to download and build it. You do that by adding the following three files to your source directory:

When prompted for default region, select the appropriate region for your organization.

When prompted for the application to use, create a new application called hxe_go_http.

When prompted for platform, select “Go”.

When prompted for platform version, select “Go 1.7”.

When prompted to use AWS CodeCommit, accept the default, “n”.

When prompted for whether you wish to setup SSH, select the answer appropriate for your organization’s security needs.

(Windows only) If you are running eb client on Windows, will encounter permissions problems on the build.sh file during deployment. An error will appear in the eb-activity.log if you don’t correct the permissions on the build.sh file:

This occurs because the Windows file, build.sh, does not have unix executable permissions set. Here is how to set the executable permissions using git.

a. Add the following section to the ./elasticbeanstalk/config.yml file then save:

deploy:
artifact: ./hxe_go_http.zip

b. Make sure you are in the source directory to execute the following commands:

(Linux and Mac) Create the environment for your Elastic Beanstalk application by issuing the following command: eb create <Your environment>.

(Linux and Mac) When the eb create command completes, you will be ready to deploy your application, deploy your application using the following command: eb deploy.

When deployment completes, you can retrieve the URL for your application using the eb status command. Your application URL is the CNAME value. When you enter the URL in a browser, you should see something like the following:

Next Steps

Time to Complete

Tags

Prerequisites

and Assumptions - Proficiency: Beginner - You have your application working in a local environment. - You have an account on Amazon Web Services(AWS). If you do not already have an AWS account, you can go to the AWS Home Page and set one up. - You have familiarized yourself with AWS Elastic Beanstalk documentation. - You have installed the Elastic Beanstalk command line interface (EBCLI). If you have not already done so, you can follow these instructions. - You have a HANA, express edition database that can be reached from the AWS Elastic Beanstalk environment. If you do not have one set up, see the HANA Express database deploy tutorial.