import com.amazonaws.auth._
s3credentials :=
new AWSCredentialsProvider {
def getCredentials(): AWSCredentials = new BasicAWSCredentials("bar", "buh")
def refresh(): Unit = {}
}
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:ListAllMyBuckets",
"Resource": "arn:aws:s3:::*"
},
{
"Effect": "Allow",
"Action": [
"s3:ListBucket",
"s3:GetBucketLocation"
],
"Resource": "arn:aws:s3:::xxxx"
},
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject"
],
"Resource": "arn:aws:s3:::xxxx/*"
}
]
}
Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied;
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:ListAllMyBuckets",
"Resource": "arn:aws:s3:::*"
},
{
"Effect": "Allow",
"Action": [
"s3:ListBucket",
"s3:GetBucketLocation"
],
"Resource": "arn:aws:s3:::xxxx"
},
{
"Effect": "Allow",
"Action": [
"s3:*"
],
"Resource": "arn:aws:s3:::xxxx/*"
}
]
}
s3:PutObjectAcl
is needed? (here)
s3:DeleteObject
is not needed, because resolver cannot delete a published artifact
s3:PutObjectAcl
is the missing chain. Here is the policy which I successfully used for publishing and resolving:{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": "arn:aws:s3:::bucket.name"
},
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:PutObjectAcl",
"s3:GetObject"
],
"Resource": "arn:aws:s3:::bucket.name/*"
}
]
}
s3:CreateBucket
may be also needed if you publish to a non-existing bucket.