Deploying the messenger API to Amazon Elastic Beanstalk

Deploying an application to AWS is simple as well. Navigate to the AWS console and select Services | ComputeElastic BeanstalkOnce in the Elastic Beanstalk Management Console, click on Create New Application. Once taken to the Create Application page, you will be asked to provide a name and description for the new application to be created. Name the app messenger-api and proceed to the next screen. You will be taken to a screen in which you are prompted to create a new environment:

Create a web server environment on this screen. Next up, you will need to configure the environment type. Select the Tomcat predefined configuration and change the environment type to Single instance:

Continue to the next screen when you are ready. On the next screen, you will need to select a source for your application. Choose Upload your own:

Now we need to create a suitable project jar to be uploaded. We can package the messenger API into a jar with the help of Maven:

Click the Maven Projects button to the right of your project IDE screen and select messenger-api | Lifecycle | package. A project jar will be packaged and stored in the target directory of the project.

Now go back to AWS and choose this jar file as the source file to be uploaded. Leave other properties as they are and click Next.  You may have to wait for a few minutes while the packaged jar is uploaded. Once the upload is done, you will be taken to a new screen where your environment information is presented to you. Proceed through the next few screens by clicking Next until you are presented with a Configuration Details screen. Change the instance type to t2.micro.

Proceed through the next screens until you reach the Review Information section. Scroll through this page until you reach the Environment Info section:

Your environment URL will differ. Take note of this information as you will need it later on. Scroll to the bottom of the web page and click Launch. Elastic Beanstalk will launch your new environment.

Once the launch finishes, you are good to go. You have successfully deployed the messenger-api to AWS.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.36.146