More Info:

Ensure that AWS Elastic Beanstalk (EB) environment logs are retained and uploaded to Amazon S3 in order to keep the logging data for future audits, historical purposes or to track and analyze the EB application environment behavior for a long period of time.

Risk Level

Medium

Address

Operational Maturity, Reliability

Compliance Standards

HIPAA, PCIDSS, GDPR, SOC2

Triage and Remediation

Remediation

To remediate the misconfiguration “Ensure Persistent Logs Are Enabled For Elastic Beanstalk Environments” for AWS using AWS console, you can follow the below steps:

  1. Login to the AWS Management Console.
  2. Navigate to the Elastic Beanstalk service.
  3. Select the Elastic Beanstalk environment for which you want to enable persistent logs.
  4. Click on the “Configuration” option from the left-hand menu.
  5. Scroll down to the “Software” section and click on the “Edit” button.
  6. Scroll down to the “Instance log streaming” section and click on the “Edit” button.
  7. Select the “Enable log file rotation” checkbox to enable persistent logs for the Elastic Beanstalk environment.
  8. Set the “Retention” value to the desired number of days for which you want to retain the logs.
  9. Click on the “Apply” button to save the changes.
  10. Wait for a few minutes for the changes to take effect.

After following these steps, persistent logs will be enabled for the Elastic Beanstalk environment, and logs will be retained for the specified number of days.

Additional Reading: