A database on gp2 is fast in the morning, then latency jumps and `VolumeQueueLength` climbs.
AdvancedTroubleshootingS3, EBS and EFS
Answer
Likely causes → gp2 gets baseline IOPS at 3 per GiB (minimum 100) and bursts to 3,000 IOPS from a credit bucket. Once BurstBalance reaches 0, the volume falls back to baseline. Another possibility is the instance's EBS bandwidth limit (EBSIOBalance% / EBSByteBalance% on smaller instances).
Diagnose →
for m in BurstBalance VolumeQueueLength VolumeReadOps VolumeWriteOps; do
aws cloudwatch get-metric-statistics --namespace AWS/EBS --metric-name $m \
--dimensions Name=VolumeId,Value=vol-0abc --statistics Average --period 300 \
--start-time $(date -u -d '-6 hour' +%FT%TZ) --end-time $(date -u +%FT%TZ) --output text | tail -3; done
Fix →
- Migrate online to gp3, which gives 3,000 IOPS and 125 MiB/s baseline independent of size:
aws ec2 modify-volume --volume-id vol-0abc --volume-type gp3 --iops 6000 --throughput 250 - If the instance is the bottleneck, move to an instance type with more EBS bandwidth
Prevent → Use gp3 as the default volume type and alarm on queue length and latency (VolumeAverageReadLatency).
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