@aws-cdk/aws-s3
Advanced tools
Comparing version 1.20.0 to 1.21.0
@@ -677,2 +677,12 @@ import * as events from '@aws-cdk/aws-events'; | ||
readonly cors?: CorsRule[]; | ||
/** | ||
* Destination bucket for the server access logs. | ||
* @default - Access logs are disabled | ||
*/ | ||
readonly serverAccessLogsBucket?: IBucket; | ||
/** | ||
* Optional log file prefix to use for the bucket's access logs. | ||
* @default - No log file prefix | ||
*/ | ||
readonly serverAccessLogsPrefix?: string; | ||
} | ||
@@ -708,2 +718,3 @@ /** | ||
protected disallowPublicAccess?: boolean; | ||
private accessControl?; | ||
private readonly lifecycleRules; | ||
@@ -782,2 +793,3 @@ private readonly versioned?; | ||
private parseLifecycleConfiguration; | ||
private parseServerAccessLogs; | ||
private parseMetricConfiguration; | ||
@@ -787,2 +799,9 @@ private parseCorsConfiguration; | ||
private renderWebsiteConfiguration; | ||
/** | ||
* Allows the LogDelivery group to write, fails if ACL was set differently. | ||
* | ||
* @see | ||
* https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl | ||
*/ | ||
private allowLogDelivery; | ||
} | ||
@@ -789,0 +808,0 @@ /** |
{ | ||
"name": "@aws-cdk/aws-s3", | ||
"version": "1.20.0", | ||
"version": "1.21.0", | ||
"description": "CDK Constructs for AWS S3", | ||
@@ -65,22 +65,22 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@aws-cdk/assert": "1.20.0", | ||
"@aws-cdk/assert": "1.21.0", | ||
"@types/nodeunit": "^0.0.30", | ||
"cdk-build-tools": "1.20.0", | ||
"cdk-integ-tools": "1.20.0", | ||
"cfn2ts": "1.20.0", | ||
"cdk-build-tools": "1.21.0", | ||
"cdk-integ-tools": "1.21.0", | ||
"cfn2ts": "1.21.0", | ||
"nodeunit": "^0.11.3", | ||
"pkglint": "1.20.0" | ||
"pkglint": "1.21.0" | ||
}, | ||
"dependencies": { | ||
"@aws-cdk/aws-events": "1.20.0", | ||
"@aws-cdk/aws-iam": "1.20.0", | ||
"@aws-cdk/aws-kms": "1.20.0", | ||
"@aws-cdk/core": "1.20.0" | ||
"@aws-cdk/aws-events": "1.21.0", | ||
"@aws-cdk/aws-iam": "1.21.0", | ||
"@aws-cdk/aws-kms": "1.21.0", | ||
"@aws-cdk/core": "1.21.0" | ||
}, | ||
"homepage": "https://github.com/aws/aws-cdk", | ||
"peerDependencies": { | ||
"@aws-cdk/aws-events": "1.20.0", | ||
"@aws-cdk/aws-iam": "1.20.0", | ||
"@aws-cdk/aws-kms": "1.20.0", | ||
"@aws-cdk/core": "1.20.0" | ||
"@aws-cdk/aws-events": "1.21.0", | ||
"@aws-cdk/aws-iam": "1.21.0", | ||
"@aws-cdk/aws-kms": "1.21.0", | ||
"@aws-cdk/core": "1.21.0" | ||
}, | ||
@@ -87,0 +87,0 @@ "engines": { |
@@ -195,3 +195,25 @@ ## Amazon S3 Construct Library | ||
### Logging configuration | ||
Use `serverAccessLogsBucket` to describe where server access logs are to be stored. | ||
```ts | ||
const accessLogsBucket = new Bucket(this, 'AccessLogsBucket'); | ||
const bucket = new Bucket(this, 'MyBucket', { | ||
serverAccessLogsBucket: accessLogsBucket, | ||
}); | ||
``` | ||
It's also possible to specify a prefix for Amazon S3 to assign to all log object keys. | ||
```ts | ||
const bucket = new Bucket(this, 'MyBucket', { | ||
serverAccessLogsBucket: accessLogsBucket, | ||
serverAccessLogsPrefix: 'logs' | ||
}); | ||
``` | ||
[S3 Server access logging]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerLogs.html | ||
### Website redirection | ||
@@ -198,0 +220,0 @@ |
@@ -71,3 +71,7 @@ import { Test } from 'nodeunit'; | ||
'if a kms key is specified, it implies bucket is encrypted with kms (dah)'(test: Test): void; | ||
'Bucket with Server Access Logs'(test: Test): void; | ||
'Bucket with Server Access Logs with Prefix'(test: Test): void; | ||
'Access log prefix given without bucket'(test: Test): void; | ||
'Bucket Allow Log delivery changes bucket Access Control should fail'(test: Test): void; | ||
}; | ||
export = _default; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1379536
61
9026
258
+ Added@aws-cdk/aws-events@1.21.0(transitive)
+ Added@aws-cdk/aws-iam@1.21.0(transitive)
+ Added@aws-cdk/aws-kms@1.21.0(transitive)
+ Added@aws-cdk/core@1.21.0(transitive)
+ Added@aws-cdk/cx-api@1.21.0(transitive)
+ Added@aws-cdk/region-info@1.21.0(transitive)
- Removed@aws-cdk/aws-events@1.20.0(transitive)
- Removed@aws-cdk/aws-iam@1.20.0(transitive)
- Removed@aws-cdk/aws-kms@1.20.0(transitive)
- Removed@aws-cdk/core@1.20.0(transitive)
- Removed@aws-cdk/cx-api@1.20.0(transitive)
- Removed@aws-cdk/region-info@1.20.0(transitive)
Updated@aws-cdk/aws-events@1.21.0
Updated@aws-cdk/aws-iam@1.21.0
Updated@aws-cdk/aws-kms@1.21.0
Updated@aws-cdk/core@1.21.0