Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kbrashears5/typescript-aws-s3-helper
Typescript AWS S3 Helper
https://github.com/kbrashears5/typescript-aws-s3-helper
aws helper javascript lambda s3 typescript
Last synced: 2 months ago
JSON representation
Typescript AWS S3 Helper
- Host: GitHub
- URL: https://github.com/kbrashears5/typescript-aws-s3-helper
- Owner: kbrashears5
- License: mit
- Created: 2020-05-27T00:19:36.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-01T05:20:51.000Z (7 months ago)
- Last Synced: 2024-11-06T10:05:46.915Z (2 months ago)
- Topics: aws, helper, javascript, lambda, s3, typescript
- Language: TypeScript
- Homepage: https://github.com/kbrashears5/typescript-aws-s3-helper#readme
- Size: 105 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
typescript-aws-s3-helper
Typescript helper functions for AWS S3 service
[![CI/CD](https://github.com/kbrashears5/typescript-aws-s3-helper/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/kbrashears5/typescript-aws-s3-helper/actions/workflows/ci-cd.yml)
[![codecov](https://codecov.io/gh/kbrashears5/typescript-aws-s3-helper/branch/master/graph/badge.svg?token=6VXT4QLN5U)](https://codecov.io/gh/kbrashears5/typescript-aws-s3-helper)
[![NPM Version](https://img.shields.io/npm/v/typescript-aws-s3-helper)](https://img.shields.io/npm/v/typescript-aws-s3-helper)
[![Downloads](https://img.shields.io/npm/dt/typescript-aws-s3-helper)](https://img.shields.io/npm/dt/typescript-aws-s3-helper)## Install
```
npm install typescript-aws-s3-helper@latest
```## Usage
### Default - running in Lambda in your own account
```typescript
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
```typescript
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
npm run prep
```to install packages and prep the git hooks