`InvalidVolume.ZoneMismatch: The volume 'vol-0abc' is not in the same availability zone as instance 'i-0def'`.
BeginnerTroubleshootingS3, EBS and EFS
Answer
Likely causes → An EBS volume exists in one AZ and can only attach to instances in that AZ.
Diagnose →
aws ec2 describe-volumes --volume-ids vol-0abc --query 'Volumes[].AvailabilityZone'
aws ec2 describe-instances --instance-ids i-0def --query 'Reservations[].Instances[].Placement.AvailabilityZone'
Fix →
aws ec2 create-snapshot --volume-id vol-0abc --description move-az
aws ec2 create-volume --snapshot-id snap-0123 --availability-zone us-east-1b --volume-type gp3
Then attach the new volume.
Prevent → Keep shared or portable data on EFS or S3, and pin stateful instances (and their ASG subnets) to the AZ of their volumes.
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