It is possible to easily deploy and run Java and .NET generated applications in AWS Elastic Beanstalk.
Before deployment, we recommend using a new environment in the Knowledge Base to generate a new deployment version that runs locally in the Tomcat or IIS of the computer used to work with GeneXus connected to the AWS RDS database,or any Cloud Database. In this way, we can make the configurations that will be used in the production database.
Before starting, make sure that you have MSDeploy installed on your machine (only if you use .NET).
- Amazon Web Services Account
- AWS Access Key creation for managing AWS Resources from the Command Line Interface.
- An AWS RDS Database
- MSDeploy installed on your machine.
* See minimal required policy to Deploy to EBS without FullAccess
- Before making a deployment, you must configure your Data store to connect to the target Database, which may be an AWS RDS Database. (ref.: Cloud Database)
- Run a Build All.
- Go to the Build menu and select the Deploy Application option.
- In the Deployment screen:
- Select the Main objects to be included in the deployment.
- In Target, select the option "AWS Elastic Beanstalk".
- Set the following properties as indicated below:
- AWS Access Key/Secret Access Key: Enter your AWS Access Key generated from: AWS Access Key creation
- AWS Default Region: Select your preferred region (localization) for your Deployment.
- Application Name: It's the name used to display the application. After deployment it will be visible from AWS Elastic Beanstalk Portal.
- Application Version: The Application version name. Every deployment must have a different version name (or will fail)
- Application Environment Name: Your environment name. Defaults to "Production", but you can create other environments such as "Test", "Preproduction".
- After selecting the main objects and configuring the necessary properties for the automatic deployment, press the Deploy button. It will build the WAR package (when JAVA) or an Web Deploy ZIP (for .NET), as well as upload and deploy it in AWS Elastic Beanstalk.
- You can check the Application URL, Status and Configuration from AWS Elastic Beanstalk Portal.
To learn more about how to use AWS Elastic Beanstalk, read this documentation.
"The instance profile aws-elasticbeanstalk-ec2-role associated with the environment does not exist."
Solution: Log in to AWS Console. Create any Elastic Beanstalk Environment through the Console, as it will create automatically the neccesary IAM profile 'aws-elasticbeanstalk-ec2-role'. You can delete the environment after.