"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.
Hello, I tried to use the plugin like this
import com.amazonaws.auth._
lazy val root = (project in file(".")).settings(
name := "helpers",
version := "0.6.0",
scalaVersion := "2.10.6",
organization := "net.pishen",
libraryDependencies ++= Seq(
"com.typesafe.play" %% "play-json" % "2.3.10",
"com.github.nscala-time" %% "nscala-time" % "2.6.0"
),
publishMavenStyle := false,
s3credentials := new EnvironmentVariableCredentialsProvider(),
s3region := Region.fromValue("us-west-2"),
publishTo := Some(s3resolver.value("S3 Repository", s3("my-bucket")).withIvyPatterns)
)
But it said that it can't find the value Region
error: not found: value Region
s3region := Region.fromValue("us-west-2"),
^
sbt.compiler.EvalException: Type error in expression
at sbt.compiler.Eval.checkError(Eval.scala:384)
at sbt.compiler.Eval.compileAndLoad(Eval.scala:183)
at sbt.compiler.Eval.evalCommon(Eval.scala:152)
at sbt.compiler.Eval.evalDefinitions(Eval.scala:122)
at sbt.EvaluateConfigurations$.evaluateDefinitions(EvaluateConfigurations.scala:271)
at sbt.EvaluateConfigurations$.evaluateSbtFile(EvaluateConfigurations.scala:109)
at sbt.Load$.sbt$Load$$loadSettingsFile$1(Load.scala:712)
at sbt.Load$$anonfun$sbt$Load$$memoLoadSettingsFile$1$1.apply(Load.scala:717)
...
And if I add this line import com.amazonaws.services.s3.model._
to my build.sbt
it will work. Seems that it can't see the type aliases in autoImport?
@/all v0.17.0 is out:
@/all Thanks to the effort of Michael Ahlers @michaelahlers, we've got a new bugfix release that workarounds the problem with redundant delimiters in the ivy-style patterns introduced in sbt 1.0 (see #52 and sbt/sbt#3573).
Everybody is recommended to update to v0.17.1