Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amaui-org/amaui-aws
AWS
https://github.com/amaui-org/amaui-aws
amaui aws aws-s3 aws-sdk aws-sdk-javascript aws-sdk-js browser express expressjs javascript js library node nodejs typescript utils web
Last synced: about 2 months ago
JSON representation
AWS
- Host: GitHub
- URL: https://github.com/amaui-org/amaui-aws
- Owner: amaui-org
- License: mit
- Created: 2022-02-03T16:15:51.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-29T22:26:58.000Z (9 months ago)
- Last Synced: 2024-10-03T20:35:53.456Z (3 months ago)
- Topics: amaui, aws, aws-s3, aws-sdk, aws-sdk-javascript, aws-sdk-js, browser, express, expressjs, javascript, js, library, node, nodejs, typescript, utils, web
- Language: JavaScript
- Homepage: https://docs.amaui.me/library/aws
- Size: 295 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
amaui AWS
AWS
MIT license
Production ready
100% test cov
Nodejs
Very simple code
Modern code
Junior friendly
Typescript
Made with :yellow_heart:
## Getting started
### Add
```sh
yarn add @amaui/aws
```Add `@aws-sdk/client-s3` peer dependency.
```sh
yarn add @aws-sdk/client-s3
```### Use
```javascript
import AmauiAws from '@amaui/aws';// Make if you wanna a config file and
// inside of it add all the process.env related props
import Config from './config';// Make a new aws instance
const amauiAws = new AmauiAws({
s3: {
bucketName: Config.aws.s3.bucketName,credentials: {
accessKeyId: Config.aws.s3.accessKeyId,
secretAccessKey: Config.aws.s3.secretAccessKey
},endpoint: Config.aws.s3.endpoint,
region: Config.aws.s3.region
}
});// Add
await amauiAws.s3.add('a', 4);// Get
await amauiAws.s3.get('a');// 4
// Remove
await amauiAws.s3.remove('a');await amauiAws.s3.get('a');
// undefined
```### Dev
Install
```sh
yarn
```Test
```sh
yarn test
```#### One time local setup
Install docker and docker-compose
- https://docs.docker.com/get-docker
- https://docs.docker.com/compose/installInstall aws
- https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
Make docker containers
```sh
yarn docker
```### Prod
Build
```sh
yarn build
```