I have a docker machine running on AWS EC2 instance. It suppose to upload data to S3 via SDK client.
- The docker machine is created in EC2 instance and using following command
--driver amazonec2 \
--amazonec2-open-port ${open-port} \
--amazonec2-region ${region} \
--amazonec2-access-key ${access-key} \
--amazonec2-secret-key ${secret-key} \
--amazonec2-instance-type ${instance_type} \
--amazonec2-ami ${this.ami} \
--amazonec2-security-group ${security_group_name} \
--swarm \
--swarm-discovery token://${swarm_join_token} \
--swarm-addr ${ip_address};
- I created IAM user with S3fullAccess and also allowed public access S3 full access screen shot
- The S3 bucket policy is
"Version": "2012-10-17",
"Id": "Policyxxx",
"Statement": [
{
"Sid": "Stmtxxx",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::xxx"
},
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::xxx",
"arn:aws:s3:::xxx/*"
]
}
]
}
It keeps showing error: AccessDenied: Access Denied
. Can someone help me?