aws-sdk-scalajs-facade-accessanalyzer


License

License

Categories

Categories

JavaScript Languages Scala AWS Container PaaS Providers Net
GroupId

GroupId

net.exoego
ArtifactId

ArtifactId

aws-sdk-scalajs-facade-accessanalyzer_sjs1_2.12
Last Version

Last Version

0.33.0-v2.892.0
Release Date

Release Date

Type

Type

jar
Description

Description

aws-sdk-scalajs-facade-accessanalyzer
aws-sdk-scalajs-facade-accessanalyzer
Project URL

Project URL

https://github.com/exoego/aws-sdk-scalajs-facade
Project Organization

Project Organization

net.exoego
Source Code Management

Source Code Management

https://github.com/exoego/aws-sdk-scalajs-facade

Download aws-sdk-scalajs-facade-accessanalyzer_sjs1_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/net.exoego/aws-sdk-scalajs-facade-accessanalyzer_sjs1_2.12/ -->
<dependency>
    <groupId>net.exoego</groupId>
    <artifactId>aws-sdk-scalajs-facade-accessanalyzer_sjs1_2.12</artifactId>
    <version>0.33.0-v2.892.0</version>
</dependency>
// https://jarcasting.com/artifacts/net.exoego/aws-sdk-scalajs-facade-accessanalyzer_sjs1_2.12/
implementation 'net.exoego:aws-sdk-scalajs-facade-accessanalyzer_sjs1_2.12:0.33.0-v2.892.0'
// https://jarcasting.com/artifacts/net.exoego/aws-sdk-scalajs-facade-accessanalyzer_sjs1_2.12/
implementation ("net.exoego:aws-sdk-scalajs-facade-accessanalyzer_sjs1_2.12:0.33.0-v2.892.0")
'net.exoego:aws-sdk-scalajs-facade-accessanalyzer_sjs1_2.12:jar:0.33.0-v2.892.0'
<dependency org="net.exoego" name="aws-sdk-scalajs-facade-accessanalyzer_sjs1_2.12" rev="0.33.0-v2.892.0">
  <artifact name="aws-sdk-scalajs-facade-accessanalyzer_sjs1_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.exoego', module='aws-sdk-scalajs-facade-accessanalyzer_sjs1_2.12', version='0.33.0-v2.892.0')
)
libraryDependencies += "net.exoego" % "aws-sdk-scalajs-facade-accessanalyzer_sjs1_2.12" % "0.33.0-v2.892.0"
[net.exoego/aws-sdk-scalajs-facade-accessanalyzer_sjs1_2.12 "0.33.0-v2.892.0"]

Dependencies

compile (3)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.13
net.exoego : aws-sdk-scalajs-facade-core_sjs1_2.12 jar 0.33.0-v2.892.0
org.scala-js : scalajs-library_2.12 jar 1.5.1

test (3)

Group / Artifact Type Version
org.scala-js : scalajs-test-bridge_2.12 jar 1.5.1
org.scalatest : scalatest_sjs1_2.12 jar 3.2.8
net.exoego : scalajs-test-helper-scalatest_sjs1_2.12 jar 0.2.0

Project Modules

There are no modules declared in this project.

aws-sdk-scalajs-facade

A complete set of Scala.js type facade for aws/aws-sdk-js.

All AWS are available and keep updating.

You may find the below peer facades useful when developing app with AWS.

Getting Started

libraryDependencies += "net.exoego" %%% "aws-sdk-scalajs-facade" % "0.33.0-v2.892.0"
scalaJSLinkerConfig ~= (_.withModuleKind(ModuleKind.CommonJSModule))

// Below are optional. Required when bundling aws-sdk for testing in sbt or
// for running the app (the generated JS) on environment without aws-sdk provided.
enablePlugins(ScalaJSBundlerPlugin)
npmDependencies += "aws-sdk" -> "2.892.0"

Check scalajs-bundler regarding how to use ScalajsBundlerPlugin.

Note) The all-in-one artifact aws-sdk-scalajs-facade includes all AWS facade and quite huge. If you depend only minimum facades, you will gain build performance boost (short fastOptJS/fullOptJS time). See the list of separate artifacts.

Using constructor

Every AWS services and their-related types are defined in facade.amazonaws.services.<service_name> package in "net.exoego" %%% "aws-sdk-scalajs-facade-<service_name>" % VERSION. See the list of separate artifacts.

Service class can be instantiated with their constructor.

import facade.amazonaws.services.s3._
for {
  image <- new S3().getObjectFuture(GetObjectRequest(
    Bucket = "foo-bar",
    Key = "123.json"
  ))
} yield {
  println(image.Body)
}

Using AWS Object

AWS object is defined in core project. "aws-sdk-scalajs-facade-<service_name>" depends on core project so your project do not need to explicitly depend on core.

By default, AWS object expose only config field to be used for configuring aws-sdk globally.

import facade.amazonaws.AWS

AWS.config.region = "..."
AWS.config.s3 = ???

By adding the artifact "net.exoego" %%% "aws-sdk-scalajs-facade" % VERSION to libraryDependencies, AWS object aggregates all service classes so you can instantiate service class as same as in aws-sdk-js, like below:

import facade.amazonaws.AWS
import facade.amazonaws.services.dynamodb._
import scala.scalajs.js.Dictionary

for {
  record <- new AWS.DynamoDB().getItemFuture(GetItemInput(
    Key = Dictionary("product-id" -> AttributeValue.S("ABC-123")),
    TableName = "product-table"
  ))
} yield {
  println(record.Item)
}

Or using apply method, you can skip new keyword.

import facade.amazonaws.AWS
import facade.amazonaws.services.dynamodb._
import scala.scalajs.js.Dictionary

for {
  record <- AWS.DynamoDB().getItemFuture(GetItemInput(
    Key = Dictionary("product-id" -> AttributeValue.S("ABC-123")),
    TableName = "product-table"
  ))
} yield {
  println(record.Item)
}

Support matrix

ScalaJS 0.6.x ScalaJS 1.0
Scala 2.13 ✔️ (v0.30.0 is final) ✔️
Scala 2.12 ✔️ (v0.30.0 is final) ✔️
Scala 2.11 N/A N/A
Scala 2.10 N/A N/A
  • ✔️ Supported
  • 🚧 Not supported but planned

Origin

Auto-generated from aws-sdk-scalajs-facade-generator.

This project started as a fork of awesome balshor/aws-sdk-scalajs-facade.

Intention of fork is to

  • Re-design based on my team's preference since my projects are blessed with this facade.
  • Continue updating with eco-system (Scala.JS and aws-sdk) timely.
  • Make it more type-safe and easier to use.
  • Add some convenient bridges between Node.js and Scala.js.

Development

  1. npm install
  2. sbt ~compile
  3. Edit source code

License

Apache-2.0

See LICENSE.txt.

Versions

Version
0.33.0-v2.892.0
0.32.0-v2.798.0
0.31.0-v2.731.0
0.30.0-v2.715.0
0.29.0-v2.624.0