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
# Example automatically generated from non-compiling source. May contain errors.
import { SnsDestination } from '@aws-cdk/aws-lambda-destinations';
import { Bucket } from '@aws-cdk/aws-s3';
import { Topic } from '@aws-cdk/aws-sns';
import { EmailSubscription } from '@aws-cdk/aws-sns-subscriptions';
import { Construct, RemovalPolicy, Stack, StackProps } from '@aws-cdk/core';
import { Scanner } from '@cloudcomponents/cdk-s3-antivirus';
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');
topic.addSubscription(new EmailSubscription(process.env.DEVSECOPS_TEAM_EMAIL as string));
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
Close
Hashes for cloudcomponents.cdk-s3-antivirus-1.11.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 168d3156d8af1b40ffffbbfa1005e19987f5d99047db45c413270916079c9b5c |
|
MD5 | eca3c4c70dfab4d01cd6603b97d978eb |
|
BLAKE2b-256 | 2cc108392d1bbdeb13f8fefc7157e707fbad8453405f9c4a717517c3e52b8c05 |
Close
Hashes for cloudcomponents.cdk_s3_antivirus-1.11.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1749209f3ddd770a829aa6acefd631671035108fbfc801bda4ca58ce7bb2cbcf |
|
MD5 | 3578417953c947c4904e6dfcf82165f1 |
|
BLAKE2b-256 | eb4bb4d16f95f270b5db97a9ff0d1bd44c6de87df2880ad11624453c12846efd |