Skip to content

Commit

Permalink
chore(docs): update readme(add install, example, license)
Browse files Browse the repository at this point in the history
  • Loading branch information
yicr committed Dec 20, 2024
1 parent e01ccee commit 213ddae
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,43 @@
[![View on Construct Hub](https://constructs.dev/badge?package=@gammarers/aws-cloudfront-access-log-relocater)](https://constructs.dev/packages/@gammarers/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

```shell
npm install @gammarers/aws-rds-database-running-schedule-stack
```

#### install by yarn

```shell
yarn add @gammarers/aws-rds-database-running-schedule-stack
```

## Example

```typescript
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.

0 comments on commit 213ddae

Please sign in to comment.