Installations
npm install @everymundo/aws-s3-client
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
18.15.0
NPM Version
9.6.2
Score
64.7
Supply Chain
77.9
Quality
83.4
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
Shell (57.77%)
JavaScript (42.23%)
Developer
EveryMundo
Download Statistics
Total Downloads
7,589
Last Day
6
Last Week
28
Last Month
189
Last Year
1,611
GitHub Statistics
31 Commits
4 Watching
1 Branches
31 Contributors
Package Meta Information
Latest Version
1.4.2
Package Id
@everymundo/aws-s3-client@1.4.2
Unpacked Size
4.70 kB
Size
2.27 kB
File Count
4
NPM Version
9.6.2
Node Version
18.15.0
Publised On
19 Apr 2023
Total Downloads
Cumulative downloads
Total Downloads
7,589
Last day
-66.7%
6
Compared to previous day
Last week
-31.7%
28
Compared to previous week
Last month
-14.1%
189
Compared to previous month
Last year
-26.8%
1,611
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
1
aws-s3-client
This is an extraction of the S3 client files from aws-sdk node package
Objective
The goal here is to have a smaller package (in bytes) that contains only the files necessary to interact with AWS S3 in a way so a zipped version of the application is smaller than 5MB and we are able to see our code when deployed to lambda function using custom layers
Justification
- In order for you to be able to see your code on the AWS Lambda Function console your zip deployed package has to be not larger than 5MB
- If we use a custom layer for a version of the nodejs that is newer than the ones provided by AWS the aws-sdk package is not provided
- So, when using a custom layer, we need to install the aws-sdk library to interact with S3 with our lambda function
- When we install the aws-sdk package our zip-file gets larger than 5MB, which takes from us the ability to see our code on the AWS Lambda Function console, and we don't want that
Instalation
1npm install --save @everymundo/aws-s3-client
Usage
Using Async functions your code can be as simple as this:
1// We recommend you using the following approach just so you can easily stub ```lib.S3``` on your tests 2const lib = require('@everymundo/aws-s3-client') 3 4const getS3File = async (Bucket, Key) => { 5 const s3client = new lib.S3() 6 7 return s3client.getObject({Bucket, Key}).promise() 8})
If you prefer the callback approach you can do this:
1// We recommend you using the following approach just so you can easily stub ```lib.S3``` on your tests 2const lib = require('@everymundo/aws-s3-client') 3 4const getS3File = (Bucket, Key) => new Promise((resolve, reject) => { 5 const s3client = new lib.S3() 6 7 s3client.getObject({Bucket, Key}, (err, response) => err ? reject(err) : resolve(response)) 8})
if you don't care for stubbing you can go ahead and import the S3 directly as a constant
1const {S3} = require('@everymundo/aws-s3-client') 2
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: npmCommand not pinned by hash: extract-s3-lib-from-aws-sdk.sh:18
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
2.8
/10
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More