As a developer, you have enabled server logging on an S3 bucket.
You have a simple static web page with CSS pages uploaded to the bucket which is 1 MB in total size.
After a duration of 2 weeks, you come back and see that the size of the bucket has increased to 50MB.
Which of the following could be a reason for this?
Click on the arrows to vote for the correct answer
A. B. C. D.Answer - C.
An S3 bucket with server access logging enabled can accumulate many server log objects over time.
Your application might need these access logs for a specific period after creation, and after that, you might want to delete them.
You can use the Amazon S3 lifecycle configuration to set rules so that Amazon S3 automatically queues these objects for deletion at the end of their life.
The correct answer is.
C.
This is normal behavior since the logs are being delivered to the same bucket.
Option A is incorrect because CRR (Cross-region replication) does not consume space in the S3 bucket.
Option B is incorrect because encryption does not consume space.
Option D is incorrect because monitoring and logging are two different things.
Monitoring deals with metrics and does not add data to the S3 bucket.
For more information on deleting logs files, please refer to the below URL-
https://docs.aws.amazon.com/AmazonS3/latest/dev/deleting-log-files-lifecycle.htmlOption C - "Server access logs are configured to be delivered to the same bucket as the source bucket" could be a reason for the increase in the bucket size.
When server logging is enabled on an S3 bucket, it starts recording access logs for all requests made to the bucket. These logs contain information such as the requester's IP address, the time of the request, and the object requested.
By default, these logs are stored in a separate bucket created by S3, but you can configure S3 to deliver the logs to a specific bucket. If you have configured S3 to deliver the logs to the same bucket as the source bucket, this can result in an increase in the bucket size.
In this scenario, since the developer has enabled server logging on the bucket, S3 is likely recording access logs for all requests made to the bucket. If the developer has configured S3 to deliver these logs to the same bucket as the source bucket, the logs will be stored in the bucket and increase its size over time.
Option A - "You have enabled CRR on the bucket as well" does not make sense because Cross-Region Replication (CRR) is used to replicate objects across different S3 buckets in different regions, and it does not impact the bucket size.
Option B - "You have enabled Encryption on the bucket as well" could increase the size of the bucket, but it would not cause such a significant increase in just two weeks. Encryption adds some additional metadata to the object, which can slightly increase the object's size, but it is not significant enough to increase the bucket size by 50MB in just two weeks.
Option D - "Monitoring has been enabled for the bucket" is also unlikely to be the reason for the increase in bucket size. Monitoring enables you to monitor the metrics of the bucket, such as the number of requests, data transferred, etc. It does not store any data in the bucket, so it cannot increase the bucket size.