- outline
The error occurs when using AWS CLI on EC2 which is under the subnet using IPv6.
- resolution
aws configure set default.s3.use_dualstack_endpoint true
- note
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-where