Skip to content

effect-ak/aws-sdk

Repository files navigation

NPM Version NPM Downloads

Motivation

If you use AWS SDK typescript libraries and Effect-ts then you might find this tool usefull

Getting started

Install this package

You can install this package either locally or globally

npm i -D @effect-ak/aws-sdk
# or
npm i -g @effect-ak/aws-sdk

Install AWS SDK Clients

The generated code depends on @aws-sdk/client-* packages, so they must be installed in node_modules.

Example:

"devDependencies": {
  "@aws-sdk/client-s3": "3.709.0"
}

Setup generator configuration [Optional]

Create a file named aws-sdk.json and define generator config:

{
  "$schema": "https://esm.sh/@effect-ak/aws-sdk@0.2.0/dist/schema.json"
}

Run Generation

# If @effect-ak/aws-sdk is installed locally
./node_modules/.bin/gen-aws-sdk

# If installed globally
gen-aws-sdk

AWS SDK libraries are generated as well

The AWS SDK also generates @aws-sdk/client-* libraries. They have their own project for this: Smithy.

There is a specification for each service: AWS SDK JS V3 Codegen Models.

I thought about writing my own generator that would parse the JSON specification, but it turned out to be easier to write a wrapper for the generated code.

About

Generates an AWS SDK wrapper for the Effect-ts

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published