Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@am92/aws-s3

Package Overview
Dependencies
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@am92/aws-s3

AWS S3 SDK

  • 2.0.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13
decreased by-7.14%
Maintainers
3
Weekly downloads
 
Created
Source

@am92/aws-s3

npm version  ECMAScript Module  License: MIT  Vulnerabilities: Snyk  Downloads Bundle Size


Table of Content


Installation

$ npm install --save @am92/aws-s3

Environment Variables

The following environment variables need to be set to work with this package:

##### AWS S3 SDK Config
export S3_ENABLED='false'
export S3_REGION='ap-south-1'
export S3_BUCKET=''
export S3_PRESIGNED_EXPIRY_IN_SECS='300'
export S3_CLOUDFRONT_URL=''

Note:

  • If 'S3_ENABLED' is set to 'true', 'S3_BUCKET' is required
  • Variables where values have been defined can be omitted from being defined as the mentioned values are internally defaulted.

Creating an OtpSdk Instance

import { S3Sdk } from '@am92/aws-s3'

const s3Sdk = new S3Sdk()
export default s3Sdk

In this case, configuration values are read from environment variables.

If you wish to pass your custom 'config' to OtpSdk Class, then you can build it as follows:

import { S3Sdk } from '@am92/aws-s3'

const config = {
  BUCKET: '',
  PRESIGNED_EXPIRY_IN_SECS: 300,
  CONNECTION_CONFIG: {
    region: ''
  }
}

const s3Sdk = new S3Sdk(config)
export default s3Sdk

In this case, configuration values are defaulted from environment variables. Thus partial config can be passed to the S3Sdk Class.


Contributors

Ankit Gandhi
Ankit Gandhi
Mehul Agarwal
Mehul Agarwal

Resources


License



Keywords

FAQs

Package last updated on 06 Mar 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc