The bill shows far more S3 storage than `aws s3 ls --summarize` reports.
AdvancedTroubleshootingS3, EBS and EFS
Answer
Likely causes → Incomplete multipart uploads (the parts are stored and billed, but ls does not show them), noncurrent versions, or storage-class overhead (minimum object size and duration charges for IA and Glacier).
Diagnose →
aws s3api list-multipart-uploads --bucket data --query 'Uploads[].[Key,Initiated]' --output table
aws cloudwatch get-metric-statistics --namespace AWS/S3 --metric-name BucketSizeBytes \
--dimensions Name=BucketName,Value=data Name=StorageType,Value=StandardStorage \
--statistics Average --period 86400 --start-time $(date -u -d '-3 day' +%FT%TZ) --end-time $(date -u +%FT%TZ)
Fix →
- Abort stale uploads:
aws s3api abort-multipart-upload --bucket data --key <key> --upload-id <id> - Add a lifecycle rule with
AbortIncompleteMultipartUploadDaysAfterInitiation: 7
Prevent → Put that lifecycle rule on every bucket by default, and use Storage Lens for "incomplete MPU bytes".
More on S3, EBS and EFS
`BucketAlreadyExists: The requested bucket name is not available. The bucket namespace is shared by all users of the system.`Beginner`PermanentRedirect: The bucket you are attempting to access must be addressed using the specified endpoint.`BeginnerA partner account uploads objects into your bucket, but your own admins get `403 Forbidden` reading them.Intermediate`aws s3 cp` gets `An error occurred (AccessDenied) when calling the GetObject operation` but the IAM policy allows `s3:GetObject` and the bucket policy is fine.IntermediateAn S3 static website endpoint returns `403 Forbidden` with `Code: AccessDenied`.IntermediateHigh-throughput writes get `503 SlowDown: Please reduce your request rate.`Intermediate