Menu
AWS Elastic Beanstalk
Developer Guide (API Version 2010-12-01)

Viewing Logs from Your Elastic Beanstalk Environment's Amazon EC2 Instances

AWS Elastic Beanstalk provides two ways for you to regularly view logs from the Amazon EC2 instances that run your application:

  • You can configure your Elastic Beanstalk environment to upload rotated instance logs to the environment's Amazon S3 bucket.

  • You can configure the environment to stream instance logs to Amazon CloudWatch Logs.

When you configure CloudWatch Logs, Elastic Beanstalk creates log groups for proxy and deployment logs on the Amazon EC2 instances and transfers these log files to CloudWatch Logs in real time.

For more information about log viewing, see Viewing Logs from Your Elastic Beanstalk Environment's Amazon EC2 Instances.

Configuring Log Viewing

You can enable log rotation and log streaming in the Elastic Beanstalk console.

To configure log rotation and log streaming in the Elastic Beanstalk console

  1. Open the Elastic Beanstalk console.

  2. Navigate to the management page for your environment.

  3. Choose Configuration.

  4. On the Software configuration card, choose Modify.

  5. Under S3 log storage, choose Rotate logs to enable uploading rotated logs to Amazon S3.

  6. Under CloudWatch logs, configure the following settings.

    • Log streaming – Choose to enable log streaming.

    • Retention – Specify the number of days to retain logs in CloudWatch Logs.

    • Lifecycle – Set to Delete logs upon termination to delete logs from CloudWatch Logs immediately if the environment is terminated, instead of waiting for them to expire.

  7. Choose Apply.

After you enable log streaming, you can return to the configuration page to find a link to the log group in the CloudWatch console.


        CloudWatch logs settings

Log Viewing Namespaces

Settings related to log viewing are in the following namespaces: