Simple Storage Service (S3)
Network access
Amazon S3 is a managed service, and located outside the customer’s Virtual Private Cloud (VPC). It is important to protect access to the Amazon S3 service.
Best practices
Unless there is a business requirement to share data publicly (such as static web hosting), keep all Amazon S3 buckets (all tiers) private.
To secure access from your VPC to the Amazon S3, use AWS PrivateLink. This keeps traffic internally inside the AWS backbone, through a secure channel, using the interface’s VPC endpoint.
For sensitive environments, use bucket policies to enforce access to an S3 bucket from a specific VPC endpoint or a specific VPC.
Use bucket policies to enforce the use of transport encryption (HTTPS only).
For sensitive environments, use bucket policies to require TLS version 1.2 as the minimum.
Encrypt data at rest using SSE-S3.
For sensitive environments, encrypt data at rest using SSE-C.
Consider using presigned URLs for scenarios where you need to allow external user access (with specific permissions, such as file download) to an S3 bucket for a short period, without the need to create an IAM user.
Auditing and monitoring
AWS allows you to enable logging and auditing using Amazon CloudWatch and AWS CloudTrail.
Best practices
Enable Amazon CloudWatch alarms for excessive S3 usage (for example, a high volume of GET, PUT, or DELETE operations on a specific S3 bucket).
Enable AWS CloudTrail for any S3 bucket to log any activity performed on Amazon S3 by any user, role, or AWS service.
Limit access to the CloudTrail logs to a minimum number of employees, preferably those with an AWS management account.
Enable S3 server access logs to record all access activities as complimentary to AWS CloudTrail API-based logging (for the purpose of future forensics).
Use Access Analyzer for S3 to locate S3 buckets with public access or S3 buckets that have access from external AWS accounts.
Enable file integrity monitoring to make sure files have not been changed.
Enable object versioning to avoid accidental deletion (and to protect against ransomware).
Use Amazon S3 inventory to monitor the status of S3 bucket replication (such as encryption on both the source and destination buckets).