typescript-aws-s3-helper
TypeScript icon, indicating that this package has built-in type declarations

2.0.50 • Public • Published

typescript-aws-s3-helper

Typescript helper functions for AWS S3 service

CI/CD codecov NPM Version Downloads

Install

npm install typescript-aws-s3-helper@latest

Usage

Default - running in Lambda in your own account

const logger = new Logger(LogLevel.Trace);

const helper = new S3Helper(logger);

const response = await helper.CreateBucketAsync('name');

Running in separate account or not in Lambda

import * as S3 from '@aws-sdk/client-s3';

const logger = new Logger(LogLevel.Trace);

const options: S3.S3ClientConfig = {
  accessKeyId: '{access_key}',
  secretAccessKey: '{secret_key}',
  region: 'us-east-1',
};

const repository = new S3.S3(options);

const helper = new S3Helper(logger, repository);

const response = await helper.CreateBucketAsync('name');

Notes

If no options are supplied, will default to us-east-1 as the region

Development

Clone the latest and run

npm run prep

to install packages and prep the git hooks

Package Sidebar

Install

npm i typescript-aws-s3-helper

Weekly Downloads

1

Version

2.0.50

License

MIT

Unpacked Size

118 kB

Total Files

24

Last publish

Collaborators

  • kbrashears5