Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@digitregroup/s3-event-parser
Advanced tools
Changelog
Readme
Parse AWS S3/SNS events from your Lambda function.
Notes:
npm i @digitregroup/s3-event-parser
# Or
yarn add @digitregroup/s3-event-parser
In your handler:
const S3EventParser = require('@digitregroup/s3-event-parser')
module.exports.run = (event, context, callback) => {
const parsedS3Event = new S3EventParser(event).parse();
console.log(
parsedS3Event.filePath, // Cleaned full file path
parsedS3Event.key, // Raw file path
parsedS3Event.filePrefix, // Key prefix (file path dirname)
parsedS3Event.bucketName, // Bucket name
parsedS3Event.fileSize // File size in kb
// Raw S3 event with all parsed and unparsed data
parsedS3Event.rawS3Notification
);
};
In you serverless.yml
:
functions:
myFunction:
handler: src/handlers/index.run
events:
# 1/ If you already have a S3 event subscriber in a SNS topic
- sns:
arn: arn:aws:sns:eu-west-1:0000000000:my-topic
# 2/ If you want to create a S3 bucket and attach an event to this function
- s3:
bucket: photos
event: s3:ObjectCreated:*
# 3/ If already have a S3 bucket and just want to attach an event to this function
- existingS3:
bucket: photos
event: s3:ObjectCreated:*
# Case 3/ requirement
plugins:
- serverless-external-s3-event
This project aim to keep 100% code coverage. Tests are performed via Mocha/ChaiJS (Expect version).
yarn lint
This project should respect the linting configured in @digitregroup/eslint-config.
yarn lint
CI pipelines are performed in CircleCI for every single push in any branch.
CI is composed of Linting and Unit Testing with coverage requirement (specified in package.json
)
CD pipeline is perfomed on git tag creation and release in NPM registry if the CI passed.
Note pipelines automaticaly check the package.json
's version to match with the git tag (or release/hotfix branch).
PR are welcome! We use gitflow :)
FAQs
Parse AWS S3/SNS events
The npm package @digitregroup/s3-event-parser receives a total of 3 weekly downloads. As such, @digitregroup/s3-event-parser popularity was classified as not popular.
We found that @digitregroup/s3-event-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.