Skip to content

Commit da29cfb

Browse files
authored
Merge pull request #1559 from guardian/aa/access-logs
feat(notification): Switch to DevX's provisioned access logging infrastructure
2 parents e59ea1a + 0616c13 commit da29cfb

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

notification/conf/notification.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,10 @@ Parameters:
8585
DistBucket:
8686
Type: String
8787
Description: The name of the s3 bucket containing the server artifact
88-
S3LoggingBucket:
89-
Type: String
88+
AccessLogsBucket:
89+
Type: AWS::SSM::Parameter::Value<String>
9090
Description: The name of the s3 bucket containing the access logs
91+
Default: /account/services/access-logging/bucket
9192
S3TopicCountBucket:
9293
Type: String
9394
Description: Name of the bucket storing the persisted topic subscription counts
@@ -165,8 +166,16 @@ Resources:
165166
- !Ref LoadBalancerSecurityGroup
166167
Subnets: !Ref PublicSubnets
167168
AccessLoggingPolicy:
168-
S3BucketName: !Ref S3LoggingBucket
169-
S3BucketPrefix: !Sub elb/${DomainName}
169+
S3BucketName: !Ref AccessLogsBucket
170+
171+
# This prefix pattern is used by the Athena resources DevX have provisioned in all AWS accounts.
172+
# The resources include saved queries to search AWS Load Balancer logs.
173+
S3BucketPrefix:
174+
!Sub
175+
- classic-load-balancer/${Stage}/${Stack}/${App}
176+
- Stack: !FindInMap [ Constants, Stack, Value ]
177+
App: !FindInMap [ Constants, App, Value ]
178+
170179
Enabled: true
171180
EmitInterval: 60
172181

0 commit comments

Comments
 (0)