Skip to content

bwz3rbot/async-s3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Async S3

Async S3 is an asynchronous API wrapper for the callback based Filebase Storage API - built on Amazon S3.

Using is simple.

Create a .env file:

AWS_ACCESS_KEY_ID='*****'
AWS_SECRET_ACCESS_KEY='*****'

Call Functions in your code:

/* Configure the client with API key and secret using .env file */
require('dotenv').config();

/* Create a bucket */
await require('../aws/functions/create_bucket')({
        bucketName:'my-bucket-007'
    });

/* Put Object (upload) */
await require('../aws/functions/put_object')({
        bucketName: 'my-bucket-007',
        objectKey: 'test.mp4',
        sourceFilepath: 'test.mp4'
    });

/* Get Object (download) */
const data = await require('./aws/functions/get_object')({
        bucketName: 'my-bucket-007',
        objectKey: 'test.mp4'
    });

await require('fs/promises').writeFile('output.mp4', data.Body);

About

Async S3 is an asynchronous API wrapper for the callback based Filebase Storage API - built on Amazon S3.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors