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

egg-aws-s3

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-aws-s3

S3 official sdk for egg

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
increased by300%
Maintainers
1
Weekly downloads
 
Created
Source

egg-aws-s3

NPM version build status Test coverage David deps npm download

Install

$ npm i egg-aws-s3 --save

Usage

// {app_root}/config/plugin.js
exports.awsS3 = {
  enable: true,
  package: 'egg-aws-s3',
};

Configuration

// {app_root}/config/config.default.js
exports.awsS3 = {
  client: {
    convertAsync: true,  // plugin owner property, while this flag is true, s3 client object will add async function
    sslEnabled: false,
    s3ForcePathStyle: true,
    signatureVersion: 'v2',
  },
  app: true,
  agent: false,
};

see aws document contructor property for more client detail.

Example

app.awsS3.listBuckets({}, (err, data) => {
  if (err)
    console.log(err);
  console.log(data);
});

// while convertAsync is enable, you can use async/await like
try {
  const data = await app.awsS3.listBucketsAsync({});
  console.log(data);
} catch (err) {
  console.log(err);
}

see aws document method summary for APIs.

Questions & Suggestions

Please open an issue here.

License

MIT

Keywords

FAQs

Package last updated on 08 Mar 2018

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