Add the following to your project/plugin.sbt
(Scala 2.10.x, and Scala 2.11.x):
resolvers += "Sonatype OSS Release Repository" at "https://oss.sonatype.org/content/repositories/releases/"
addSbtPlugin("org.sisioh" % "sbt-aws-plugin" % "1.0.3")
resolvers += "Sonatype OSS Snapshot Repository" at "https://oss.sonatype.org/content/repositories/snapshots/"
addSbtPlugin("org.sisioh" % "sbt-aws-plugin" % "1.0.4-SNAPSHOT")
env/dev.conf
is loaded, in defaults.
"aws": {
"cfnStackName": "test1"
"cfnStackParams": {
"S3BucketName0": "test1-dmmy-test-00001",
"S3BucketName1": "test1-dmmy-test-00002"
}
}
The above is the same mean as the following.
cfnStackName in aws := "test1",
cfnStackParams in aws := Map(
"S3BucketName0" -> "test1-dmmy-test-00001",
"S3BucketName1" -> "test1-dmmy-test-00002",
)
You can switch the configuration file by specifying the -Daws.env
.
env/staging.conf
is loaded.
$ sbt -Daws.env=staging aws::CfnStackCreateOrUpdate
- Put the CloudFormation template files in the 'aws/cfn/templates' folder
aws/cfn/templates
+ s3.template
+ rds.template
- Set the value to the setting item into build.sbt.
val root = (project in file(".").settings(
region in aws := com.amazonaws.regions.Regions.AP_NORTHEAST_1,
cfnStackName in aws := "stackA",
cfnStackParams in aws := Map("key" -> "value")
)
- Create the stack, or Update it
$ sbt aws::CfnStackCreateOrUpdate