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.
serverless-log-forwarding
Advanced tools
Changelog
[3.2.0] - 2024-01-08
Readme
Serverless plugin for forwarding CloudWatch logs to another Lambda function.
Amplify builds innovative and compelling digital educational products that empower teachers and students across the country. We have a long history as the leading innovator in K-12 education - and have been described as the best tech company in education and the best education company in tech. While others try to shrink the learning experience into the technology, we use technology to expand what is possible in real classrooms with real students and teachers.
Make sure you have the following installed before starting:
To install the plugin, run:
npm install serverless-log-forwarding
Then make the following edits to your serverless.yaml
file:
plugins:
- serverless-log-forwarding
custom:
logForwarding:
destinationARN: '[ARN of Lambda Function to forward logs to]'
# optional:
roleArn: '[ARN of the IAM role that grants Cloudwatch Logs permissions]'
filterPattern: '[filter pattern for logs that are sent to Lambda function]'
normalizedFilterID: true # whether to use normalized function name as filter ID
stages:
- '[name of the stage to apply log forwarding]'
- '[another stage name to filter]'
createLambdaPermission: true # whether to create the AWS::Lambda::Permission for the destinationARN (when policy size limits are a concern)
functions:
myFunction:
handler: src/someHandler
# optional properties for per-function configuration:
logForwarding:
# set enabled to false to disable log forwarding for a single given function
enabled: false
To run unit tests:
npm run test
For running integration tests you will need to log into you AWS account and set AWS_PROFILE environment variable, it will be used to create AWS entities for testing purposes
export AWS_PROFILE=<profile_name>
npm run integration-test
All tests should pass. All unit tests should pass before merging. Integration tests will probably take some time
If there is an error update the node_modules inside the root folder of the directory:
npm install
Unit tests are found in test/unit-tests
.
Integration tests are found in test/integration-tests
.
test/integration-tests
contains configs folder,
for every test there is a folder with serverless.yml
configuration and logs_producer.py
.
To add another test create a folder for your test with the folder name that corresponds to test name
and add code to run test to test/integration-tests/integration-tests.ts
The plugin will be packaged with the lambda when deployed as normal using Serverless:
serverless deploy
If you have any security issue to report, contact project maintainers privately. You can reach us at github@amplify.com
We welcome pull requests! For your pull request to be accepted smoothly, we suggest that you:
FAQs
a serverless plugin to forward logs to given lambda function
The npm package serverless-log-forwarding receives a total of 5,766 weekly downloads. As such, serverless-log-forwarding popularity was classified as popular.
We found that serverless-log-forwarding demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.