aws-s3 - AWS-S3 binding for Scala.js.
An AWS-S3 binding for Scala.js.
$ sbt clean publish-local
Before running the tests the first time, you must ensure the npm packages are installed:
$ npm install
Then you can run the tests:
$ sbt test
import io.scalajs.nodejs._
import io.scalajs.npm.aws._
import io.scalajs.npm.aws.s3._
val s3 = new S3(ClientConfiguration(
accessKeyId = "[YOUR PUBLIC ACCESS KEY]",
secretAccessKey = "[YOUR SECRET ACCESS KEY]",
region = "us-west-1"
))
val params = new BucketParams(Bucket = "test-bucket")
s3.getBucketLocation(params, (err, data) => {
if (err != null) console.log(err, err.stack)
else console.log(data)
})
To add the aws-s3
binding to your project, add the following to your build.sbt:
libraryDependencies += "io.scalajs.npm" %%% "aws-s3" % "0.5.0"
Optionally, you may add the Sonatype Repository resolver:
resolvers += Resolver.sonatypeRepo("releases")