https://github.com/maginepro/aws-regions
Scala micro library for AWS regions :earth_africa:
https://github.com/maginepro/aws-regions
aws scala
Last synced: over 1 year ago
JSON representation
Scala micro library for AWS regions :earth_africa:
- Host: GitHub
- URL: https://github.com/maginepro/aws-regions
- Owner: maginepro
- License: apache-2.0
- Created: 2025-03-12T09:32:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-27T13:18:19.000Z (over 1 year ago)
- Last Synced: 2025-03-27T13:31:59.029Z (over 1 year ago)
- Topics: aws, scala
- Language: Scala
- Homepage:
- Size: 51.8 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.txt
Awesome Lists containing this project
README
# :earth_africa: aws-regions
Scala micro library for AWS regions.
## Usage
You can add the following lines to `build.sbt` to use the library.
```scala
libraryDependencies ++= Seq(
"com.magine" %% "aws-regions" % awsRegionsVersion,
"com.magine" %% "aws-regions-circe" % awsRegionsVersion,
"com.magine" %% "aws-regions-ciris" % awsRegionsVersion
)
```
Make sure to replace `awsRegionsVersion` with a [release version](https://github.com/maginepro/aws-regions/releases).
Replace `%%` with `%%%` if you are using [Scala.js](https://www.scala-js.org) or [Scala Native](https://scala-native.org).
## Quick Example
```scala
import com.magine.aws.Region
Region.EU_WEST_1 == Region("eu-west-1") // true
Region.EU_WEST_1 == Region("EU-WEST-1") // true
Region.valid("eu-west-1") // Right(eu-west-1)
Region.valid("EU-WEST-1") // Right(eu-west-1)
Region.valid("eu-west-4") // Left(com.magine.aws.InvalidRegion: Invalid region: eu-west-4)
```