1.0.2 • Published 2 years ago

@solvethex/aws-s3 v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Uses the aws-sdk library to upload & download files from a bucket.

import awsS3 from 's3-services'

const { downloadS3Service, uploadS3Service } = awsS3({
    region: '<aws-region>',
    accessKeyId: '<aws-accessKeyId>',
    secretAccessKey: '<aws-secretAccessKey>',
})

await downloadS3Service.download(key, { bucket: '<aws-bucket>', prefix?: '<object-prefix>' })

await uploadS3Service.uploadFiles(files, { bucket: '<aws-bucket>', prefix?: '<object-prefix>' })
await uploadS3Service.uploadBuffer(buffer, key, { bucket: '<aws-bucket>', prefix?: '<object-prefix>' })