I have an EC2 instance which has all inbound traffic open. It is assigned the below role:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::test-bucket"
]
},
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject",
"s3:ListObject"
],
"Resource": [
"arn:aws:s3:::test-bucket/*"
]
}
]
}
I am trying to copy a file from an S3 bucket to this instance.
aws s3 cp s3://test-bucket/test.csv /home/ubuntu/
I am getting this error:
fatal error: Connect timeout on endpoint URL: "https://test-bucket.s3.eu-central-1.amazonaws.com/test.csv"
What am I doing wrong? How can I get the public IP address used by my S3 bucket? I can try to specify that in my outbound rules for the EC2.
--region=eu-west-1or in your~/.aws/config- MarkAWard