Socket
Socket
Sign inDemoInstall

async-s3-client

Package Overview
Dependencies
3
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    async-s3-client

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


Version published
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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);

FAQs

Last updated on 16 Jul 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc