UNPKG

@cdklabs/aws-data-solutions-framework

Version:
58 lines (57 loc) 1.95 kB
import { ISecurityGroup } from 'aws-cdk-lib/aws-ec2'; import { IRole } from 'aws-cdk-lib/aws-iam'; import { IFunction } from 'aws-cdk-lib/aws-lambda'; import { ILogGroup } from 'aws-cdk-lib/aws-logs'; import { Construct } from 'constructs'; import { S3DataCopyProps } from './s3-data-copy-props'; import { TrackedConstruct } from './tracked-construct'; /** * Copy data from one S3 bucket to another. * @see https://awslabs.github.io/data-solutions-framework-on-aws/docs/constructs/library/Utils/s3-data-copy * * @example * import { Bucket } from 'aws-cdk-lib/aws-s3'; * * const sourceBucket = Bucket.fromBucketName(this, 'SourceBucket', 'nyc-tlc'); * const bucketName = `test-${this.region}-${this.account}-${dsf.utils.Utils.generateUniqueHash(this, 'TargetBucket')}`; * * const targetBucket = new Bucket(this, 'TargetBucket'); * * new dsf.utils.S3DataCopy(this, 'S3DataCopy', { * sourceBucket, * sourceBucketPrefix: 'trip data/', * sourceBucketRegion: 'us-east-1', * targetBucket, * }); */ export declare class S3DataCopy extends TrackedConstruct { /** * The CloudWatch Log Group for the S3 data copy */ readonly copyLogGroup: ILogGroup; /** * The IAM Role for the copy Lambba Function */ readonly copyRole: IRole; /** * The Lambda Function for the copy */ readonly copyFunction: IFunction; /** * The list of EC2 Security Groups used by the Lambda Functions */ readonly securityGroups?: ISecurityGroup[]; /** * The CloudWatch Log Group for the S3 data copy cleaning up lambda */ readonly cleanUpLogGroup?: ILogGroup; /** * The Lambda function for the S3 data copy cleaning up lambda */ readonly cleanUpFunction?: IFunction; /** * The IAM Role for the the S3 data copy cleaning up lambda */ readonly cleanUpRole?: IRole; constructor(scope: Construct, id: string, props: S3DataCopyProps); }