0.6.3 • Published 2 years ago

aws-sdk-plus v0.6.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

aws-sdk-plus

AWS SDK is a second layer package built on top of aws-sdk. It exposes several common helper functions to make the sdk easier to use. The package exports each method as it's own module in a function-per-file style.

Methods

Each method could be imported as its own module. For example, this is how you could use the method, example:

import example from "aws-sdk-plus/dist/example";

example();

All methods will also be available from the root module, if you choose to install the whole package:

import { example } from "aws-sdk-plus";

example();

createAPIGatewayProxyHandler

Takes in a method and converts it into an APIGatewayProxyHandler. It handles parsing the incoming event body, serializing the output, attaching a reasonable status code, and adding a CORs header. Use the environment variable HOST to specify a specific origin to allow, otherwise it will use the wildcard, "*".

import createAPIGatewayProxyHandler from "aws-sdk-plus/dist/createAPIGatewayProxyHandler";

const lambda = ({ id }) => ({ user: { id, name: 'David Vargas' } });

export const handler = createAPIGatewayProxyHandler(lambda);

This then allows you to export the type of the inner lambda function for strict front end typing in request libraries like axios.

0.6.3

2 years ago

0.6.2

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.3

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.4.1

3 years ago

0.4.2

2 years ago

0.3.0

3 years ago

0.3.2

3 years ago

0.4.0

3 years ago

0.3.1

3 years ago

0.3.3

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago