F_SO_K
F_SO_K

Reputation: 14869

Elastic Beanstalk log size for default volume

I have an Elastic Beanstalk instance I am using to run a web application. It is a t2.small instance with a default volume type and size. I am running a Tomcat 8.5 container.

I am setting up my logback logging and I am trying to decide the maximum size to allow for the logs (in bytes). I have already set a maximum of 30 days logging to keep. I know I can change the root volume size. However

  1. How large in my default volume? And/or how can I find this out directly?
  2. If my logs filled up the volume, how would EBS respond? Would it autoscale?

Upvotes: 1

Views: 1599

Answers (1)

sudheerchamarthi
sudheerchamarthi

Reputation: 1241

  1. How large in my default volume? And/or how can I find this out directly?

    • By default, Beanstalk creates an instance with 8GB root volume(Default behaviour of EC2). To confirm, you can navigate to the EC2 console, find out your EB instance and get the Volume ID attached to the instance, using which you can see the Size of your EBS volume.
  2. If my logs filled up the volume, how would EBS respond? Would it autoscale?

    • If root Volume gets filled up, EBS will not do any autoscale and your application may go down due to insufficient storage. However, Beanstalk provides a feature called log rotation to S3, which will rotate all your logs to S3 hourly.

Follow the below Steps to enable S3 log rotation:

To enable log rotation to Amazon S3, navigate to the Software Configuration section of the Configuration page in the environment management console. Under Log Options, select Enable log file rotation to Amazon S3 and then choose Apply. Instances in your environment will attempt to upload logs that have been rotated once per hour.

To upload rotated logs to Amazon S3, the instances in your environment must have an instance profile with permission to write to your Elastic Beanstalk Amazon S3 bucket. These permissions are included in the default instance profile that Elastic Beanstalk prompts you to create when you launch an environment in the Elastic Beanstalk console for the first time.

Source: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.logging.html#health-logs-instancelocation

Upvotes: 5

Related Questions