Many of us know that one of the most important services of AWS is Elastic beanstalks. We deployed our application on Beanstalk and AWS itself manage most of the thing in it. One of them is Logs of Applications.
I Hope you will be able to connect your local machine to EB , If you have any issue ,Please leave us a comment we will look into it.
Also Read:
Thanks for reading.
People usually were not able to see the tail of the logs of the application what they need to do is to go to the beanstalk and under logs, they ask for the last 100 lines of logs or full logs (which include the of the application along with the other logs ).
Today we will learn how to connect with the beanstalk application through EB CLI and see the logs.
let's follow the below steps.
- Install the Python Once installed run below commands
- python --version
- pip --version
- pip install awsebcli --upgrade --user
- once ebcli installed successfully, you can check by
- eb --version
- define the Python Home in your Environment Variable.
- Now Run your command prompt as Administrator and write
eb init --interactiveYou will see the below image.
- Now select the region you have deployed your application.
- After that, you will be asked to Create a new Application
- Once your application will be created you will see below screen.
- You need to select the appropriate platform you have used for your application.
- Now Once you do it you will be asked to create the SSH
Select Yes
- Then they will ask you to create the keypair
- Provide your password and then you will see the below image
- Now you have successfully created your SSH and it is uploaded to your beanstalk as well.
- you need to attach the SSH with the Application.
Follow below steps
eb ssh <Application-name> --settings
- You will get the list of options then it will ask for the keypair which you need to attach.
- Select the appropraite one.
- After selecting the one you will be asked to enter the password set earlier.
- You will then have the Applicaiton connected.
- Once connected successfully you will be getting below image.
Now go to
/var/log/tomcat8 ( to see the application logs, if your application is deployed on tomcat)
I Hope you will be able to connect your local machine to EB , If you have any issue ,Please leave us a comment we will look into it.
Also Read:
- Spring Boot and Hibernate Tutorials - Application using Spring Boot
- What is Spring boot ?
- How to read value from property file in spring boot ?
- First Rest API Application - Top Spring Framework Interview Questions
- Implementation of Swagger in Spring boot
- How to use h2 database in spring boot
Thanks for reading.