Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/czantoine/s3-file-extension-scanner-aws
A serverless solution to detect file extension anomalies in S3 buckets and send email notifications.
https://github.com/czantoine/s3-file-extension-scanner-aws
aws-lambda scanner sns
Last synced: about 2 months ago
JSON representation
A serverless solution to detect file extension anomalies in S3 buckets and send email notifications.
- Host: GitHub
- URL: https://github.com/czantoine/s3-file-extension-scanner-aws
- Owner: czantoine
- License: other
- Created: 2023-05-30T20:20:42.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-17T05:53:41.000Z (4 months ago)
- Last Synced: 2024-09-17T08:29:18.397Z (4 months ago)
- Topics: aws-lambda, scanner, sns
- Homepage:
- Size: 189 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# S3 File Extention Scanner
A serverless solution built with AWS CloudFormation to scan S3 buckets for file extension anomalies. It utilizes AWS Lambda, Amazon S3, and Amazon SNS to detect files with specific extensions and send email notifications. Keep your S3 buckets secure and organized with this automated scanning solution.
## Solution Architecture
![Solution Architecture](img/architecture_diagram.png)
## Key Components
- AWS CloudFormation
- AWS Lambda
- Amazon S3
- Amazon SNS
- AWS Events## Configuration
Before deploying the CloudFormation stack, make sure to update the following configuration parameters in the CloudFormation template:
- `BucketList`: Comma-separated list of buckets to check.
- `EmailAddress`: The email address to receive the notification.
- `CronStart`: The cron expression for scheduling the scan.## Usage
1. Deploy the CloudFormation stack using the provided template.
2. Once the stack is deployed, the Lambda function will start scanning the specified S3 buckets for file extension anomalies.
3. If any anomalies are detected, an email notification will be sent to the configured email address via Amazon SNS.
4. The scan can be scheduled using AWS Events by modifying the `CronStart` parameter in the CloudFormation template.## Note
- Make sure the IAM role associated with the Lambda function has the necessary permissions to access S3 buckets and publish messages to SNS topics.
- Ensure that the specified S3 buckets have the appropriate permissions for the Lambda function to list objects.## Usage Limits
- The solution is subject to the usage limits of the AWS services involved, such as Lambda. If there is a large number of buckets and files inside them, the Lambda function may take longer to execute and may even timeout after 900 seconds.
## Security
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
## License
This repository is licensed under the Apache License 2.0. See the LICENSE file.