Skip to content

Commit

Permalink
revert: "chore(ec2): enforceSSL on flowLog s3 bucket (#18271)" (#18770)
Browse files Browse the repository at this point in the history
#18271 resulted in the definition of a new bucket policy, which broke existing users that already had an implicit bucket policy created by AWS (see [docs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html#AWS-logs-infrastructure-S3)).

Reverts commit 0ed5e85 in the meantime until we figure out the longer term solution.

Fixes #18676


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
Elad Ben-Israel authored Feb 1, 2022
1 parent 121e4a1 commit a2eb092
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 48 deletions.
1 change: 0 additions & 1 deletion packages/@aws-cdk/aws-ec2/lib/vpc-flow-logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ class S3Destination extends FlowLogDestination {
if (this.props.s3Bucket === undefined) {
s3Bucket = new s3.Bucket(scope, 'Bucket', {
encryption: s3.BucketEncryption.UNENCRYPTED,
enforceSSL: true,
removalPolicy: RemovalPolicy.RETAIN,
});
} else {
Expand Down
47 changes: 0 additions & 47 deletions packages/@aws-cdk/aws-ec2/test/integ.vpc-flow-logs.expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -527,53 +527,6 @@
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
},
"VPCFlowLogsS3BucketPolicyB2C2A045": {
"Type": "AWS::S3::BucketPolicy",
"Properties": {
"Bucket": {
"Ref": "VPCFlowLogsS3BucketFB7DC2BE"
},
"PolicyDocument": {
"Statement": [
{
"Action": "s3:*",
"Condition": {
"Bool": {
"aws:SecureTransport": "false"
}
},
"Effect": "Deny",
"Principal": {
"AWS": "*"
},
"Resource": [
{
"Fn::GetAtt": [
"VPCFlowLogsS3BucketFB7DC2BE",
"Arn"
]
},
{
"Fn::Join": [
"",
[
{
"Fn::GetAtt": [
"VPCFlowLogsS3BucketFB7DC2BE",
"Arn"
]
},
"/*"
]
]
}
]
}
],
"Version": "2012-10-17"
}
}
},
"VPCFlowLogsS3FlowLogB5256CFF": {
"Type": "AWS::EC2::FlowLog",
"Properties": {
Expand Down

0 comments on commit a2eb092

Please sign in to comment.