Can't request logs in elastic beanstalk - amazon-web-services

I want to request logs of my elastic beanstalk environment and I'm using the UI for it. However, upon requesting the logs, there's a loading period after which the logs don't show up. How can I fix this?

Related

AWS Elastic Beanstalk Degraded

I am deploying a Django application on Elastic Beanstalk and getting 'Degraded' Health message. The gateway also shows 502 error. When I check for causes, I get the following messages: 'Following services are not running: web' and 'Impaired services on all instances.
How do I resolve this?

AWS Elastic beanstalk custom image IIS deployment failing

I have created a custom image in AWS elastic beanstalk and configured IIS and Management Services as well. but when using the said custom image to deploy an application. the instance spins up and i can see the IIS welcome page but the deployment never completes and the environment stays in pending (grey) state forever. Any help on how i can resolve this is much appreciated.

Elastic Beanstalk 502 errors during autoscaling

I have an Elastic Beanstalk app running on Docker set up with autoscaling. When another instance is added to my environment as a result of autoscaling, it will 502 while the instance goes through the deployment process. If I ssh into the relevant box, I can see (via docker ps) that docker is in the process of setting itself up.
How can I prevent my load balancer from directing traffic to the instance until after the instance deployment has actually completed? I found this potentially related question on SuperUser, but I think my health check URL is set-up properly -- I have it set-up to point at the root of the domain, which definitely 502s when I navigate to it in my browser, so I suspect that's not the cause of my problem.

How can I get useful load testing data for my AWS server?

I have a system set up on AWS where I have a set of ec2 insatnces (as an application server from an elastic beanstalk) running in an auto-scaling load-balanced environment. All this works fine.
I would like to load test this instance in order to obtain results that help me to figure out what more needs to be done to the system in order for it to handle, potentially, millions of users. I have used a tool called Locust (http://locust.io) so far to do this. This allows me to send requests to my instance(s?) through a proxy as desired. However, I cannot tell whether the requests are being routed to multiple instances or the same one constantly; and if they are being load balanced appropriately I can't see how many requests each of the ec2 instances are receiving or their health under load. (I have a feeling that the requests are not being properly load balanced as the failure rate always seems to increase drastically at a similar point every test run.)
Is there a way to get this information inside from the AWS ec2 or elastic beanstalk consoles, or is there a better distributed web based load testing tool that can provide the data I need?
There are two ways to get this information
1) Create S3 Bucket and save ELB logs. You can filter these logs to check which instance is serving your request
2) Retrieve application level logs : If apache/nginx installed on your EC2 instances to serve the request. Filter apache/nginx logs in every machine
Hope it helps !!
There is a way to get this data from the AWS console.
Inside the elastic beanstalk console there is a tab titled health. This tab (in the enhanced health overview) shows the number of requests per second, the response for the requests, the latency, the load average and the CPU utilisation for each ec2 instance being run by the elastic beanstalk.
An example of this data is shown in the following image.
This data allows the system manager to see which of their back-end instances are receiving requests and how many they are each being sent through a load-balancer and a proxy.
This can also be attained from the AWS CLI using:
eb health environment_name

How to access Windows Event Log in terminated Elastic Beanstalk instance

We have a ASP.NET MVC web application that is deployed to elastic beanstalk. There is an issue that is causing an instance to be identified as unhealthy and terminated. I suspect there's some information in the windows event logs that is going to help me diagnose the issue but once the instance is terminated, the logs are gone.
Any ideas how we could preserve the instance or the logs so that we can have a look at the windows event log?