@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
Metadata
Release files for cloudcomponents.cdk-s3-antivirus 2.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cloudcomponents.cdk-s3-antivirus-2.4.0.tar.gz | 11.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cloudcomponents.cdk_s3_antivirus-2.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.3 MB
Release files / cloudcomponents.cdk-s3-antivirus-2.4.0.tar.gz
| Download URL | cloudcomponents.cdk-s3-antivirus-2.4.0.tar.gz |
|---|---|
| Size | 11.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf8f0474b78f9e12d1172ab793c9431c8f0890b53b67b3ba738721ab20a1c22b
|
|
BLAKE2b-256 checksum How to use checksums |
ef252e6efcbb7a9ca36914e56e55c989fe151f2f87304be70e95fa6239a22217
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / cloudcomponents.cdk_s3_antivirus-2.4.0-py3-none-any.whl
| Download URL | cloudcomponents.cdk_s3_antivirus-2.4.0-py3-none-any.whl |
|---|---|
| Size | 11.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
49638fda8bd9b3117c0f55253d5c6597a24c99e7e13bb802301b97845f3f2121
|
|
BLAKE2b-256 checksum How to use checksums |
acc9566ac4b119f94acf3cd0ca3c4ff99fc60972ceeee64860805c55873b369e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|