@gammarers/aws-cloudfront-access-log-relocater
v0.1.4
Published
This AWS CDK construct modifies the storage format of CloudFront logs in S3 to make them easier to query with Athena and Glue. By enabling event notifications to EventBridge for logs generated by CloudFront, it detects their creation and uses a Step Funct
Downloads
523
Maintainers
Readme
AWS CloudFront Access Log Relocater
This AWS CDK construct modifies the storage format of CloudFront logs in S3 to make them easier to query with Athena and Glue. By enabling event notifications to EventBridge for logs generated by CloudFront, it detects their creation and uses a Step Functions state machine to copy them to a specified S3 bucket (with a specified prefix) while also providing functionality to delete the original files.
Install
TypeScript
install by npm
npm install @gammarers/aws-rds-database-running-schedule-stack
install by yarn
yarn add @gammarers/aws-rds-database-running-schedule-stack
Example
import { CloudFrontAccessLogRelocater } from '@gammarer/aws-rds-database-running-schedule-stack';
declare const logBucket: s3.Bucket;
new CloudFrontAccessLogRelocater(stack, 'CloudFrontAccessLogRelocater', {
accessLogSource: {
bucket: logBucket,
objectPrefix: 'origin-logs',
},
accessLogDestination: {
bucket: logBucket,
objectPrefix: 'partitioning-log',
},
});
License
This project is licensed under the Apache-2.0 License.