Antivirus for Amazon S3
Project description
@cloudcomponents/cdk-s3-antivirus
Antivirus for Amazon S3
Install
TypeScript/JavaScript:
npm i @cloudcomponents/cdk-s3-antivirus
Python:
pip install cloudcomponents.cdk-s3-antivirus
How to use
import { Scanner } from '@cloudcomponents/cdk-s3-antivirus';
import { RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib';
import { SnsDestination } from 'aws-cdk-lib/aws-lambda-destinations';
import { Bucket } from 'aws-cdk-lib/aws-s3';
import { Topic } from 'aws-cdk-lib/aws-sns';
import { EmailSubscription } from 'aws-cdk-lib/aws-sns-subscriptions';
import { Construct } from 'constructs';
export class S3AntivirusStack extends Stack {
constructor(scope: Construct, id: string, props: StackProps) {
super(scope, id, props);
const bucket = new Bucket(this, 'Bucket', {
autoDeleteObjects: true,
removalPolicy: RemovalPolicy.DESTROY,
});
const topic = new Topic(this, 'Topic');
if (process.env.DEVSECOPS_TEAM_EMAIL) {
topic.addSubscription(new EmailSubscription(process.env.DEVSECOPS_TEAM_EMAIL));
}
const scanner = new Scanner(this, 'Scanner', {
onResult: new SnsDestination(topic),
onError: new SnsDestination(topic),
});
scanner.addSourceBucket(bucket);
}
}
API Reference
See API.md.
Example
See more complete examples.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file cloudcomponents.cdk-s3-antivirus-2.4.0.tar.gz
.
File metadata
- Download URL: cloudcomponents.cdk-s3-antivirus-2.4.0.tar.gz
- Upload date:
- Size: 11.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf8f0474b78f9e12d1172ab793c9431c8f0890b53b67b3ba738721ab20a1c22b |
|
MD5 | fba44dfd03b1545a8c2baf65dec8af37 |
|
BLAKE2b-256 | ef252e6efcbb7a9ca36914e56e55c989fe151f2f87304be70e95fa6239a22217 |
File details
Details for the file cloudcomponents.cdk_s3_antivirus-2.4.0-py3-none-any.whl
.
File metadata
- Download URL: cloudcomponents.cdk_s3_antivirus-2.4.0-py3-none-any.whl
- Upload date:
- Size: 11.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49638fda8bd9b3117c0f55253d5c6597a24c99e7e13bb802301b97845f3f2121 |
|
MD5 | 8e91fd9a782877bc8fce39003194ce35 |
|
BLAKE2b-256 | acc9566ac4b119f94acf3cd0ca3c4ff99fc60972ceeee64860805c55873b369e |