Why is my AWS S3 Usage So High?

0

Hello,

I just launched a Spring Boot application on Elastic Beanstalk and it connects to an AWS RDS database that I set up.

I've had to upload many versions of my .jar file to EB to get it to work as I was troubleshooting and figuring out how to deploy it properly.

Can someone please explain what this S3 usage is and why I am over 50% for the month? Is it because I had to keep uploading a new .jar file to EB?

For example:

Amazon Simple Storage Service 2,000 Put, Copy, Post or List Requests of Amazon S3 54.65% usage

Is this because I kept uploading new versions of my application?

Best, Sai

2 Answers
1

Elastic Beanstalk creates an Amazon S3 bucket named elasticbeanstalk-region-account-id for each region in which you create environments. Elastic Beanstalk uses this bucket to store objects, for example temporary configuration files, that are required for the proper operation of your application.

The following table lists some objects that Elastic Beanstalk stores in your elasticbeanstalk-* Amazon S3 bucket. The table also shows which objects have to be deleted manually. To avoid unnecessary storage costs, and to ensure that personal information isn't retained, be sure to manually delete these objects when you no longer need them.

ObjectWhen stored?When deleted?
Application versionsWhen you create an environment or deploy your application code to an existing environment, Elastic Beanstalk stores an application version in Amazon S3 and associates it with the environment.During application deletion, and according to Version lifecycle.
Source bundlesWhen you upload a new application version using the Elastic Beanstalk console or the EB CLI, Elastic Beanstalk stores a copy of it in Amazon S3, and sets it as your environment's source bundle.Manually. When you delete an application version, you can choose Delete versions from Amazon S3 to also delete the related source bundle.
Custom platformsWhen you create a custom platform, Elastic Beanstalk temporarily stores related data in Amazon S3.Upon successful completion of the custom platform's creation.
Log filesYou can request Elastic Beanstalk to retrieve instance log files (tail or bundle logs) and store them in Amazon S3. You can also enable log rotation and configure your environment to publish logs automatically to Amazon S3 after they are rotated.Tail and bundle logs: 15 minutes after they are created. Rotated logs: Manually.
Saved configurationsManualManual

Refer to Using Elastic Beanstalk with Amazon S3

RoB
answered 2 years ago
  • Thanks RoB -- I had some sensitive Twilio API Keys and Auth Tokens stored in an application.properties file that was included in a .jar file that I deployed to beanstalk and I even had those variables in Environment Properties for my EB application. My twilio account was subsequently hacked recently and I assume it's because my S3 buckets were publicly available. Would that be the case?

0

Part of the S3 pricing is # of API requests.

As you might know, almost everything in AWS is an API call.

Whenever you upload an object to S3, it's a PUT call. If you download / browse or Elastic Beanstalk retrieves a JAR file, it's a GET call.

Of course you can always go to CloudTrail and see who exactly is making those API calls (provided you enabled CloudTrail trail to log S3 data event), but considering you only have ~2k calls, most likely it's due to either you upload your JAR and Elastic Beanstalk's deployment retrieving your artifact from S3.

Jason_S
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions