Skip to content

Commit

Permalink
CMDCT-4223 making sure important logs are retained
Browse files Browse the repository at this point in the history
  • Loading branch information
peoplespete committed Jan 2, 2025
1 parent 9366a9a commit 26e76d5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
7 changes: 5 additions & 2 deletions services/app-api/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ provider:
name: aws
runtime: nodejs20.x
region: us-east-1
stackTags:
stackTags:
PROJECT: ${self:custom.project}
SERVICE: ${self:service}
SERVICE: ${self:service}
tracing:
apiGateway: true
logs:
Expand Down Expand Up @@ -646,6 +646,9 @@ resources:
gatewayresponse.header.Access-Control-Allow-Headers: "'*'"
ResponseType: DEFAULT_5XX
RestApiId: !Ref ApiGatewayRestApi
ApiGatewayLogGroup:
Type: AWS::Logs::LogGroup
DeletionPolicy: Retain

Outputs:
ApiGatewayRestApiName:
Expand Down
5 changes: 3 additions & 2 deletions services/ui-waflog-s3-bucket/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ provider:
name: aws
runtime: nodejs20.x
region: us-east-1
stackTags:
stackTags:
PROJECT: ${self:custom.project}
SERVICE: ${self:service}
SERVICE: ${self:service}

custom:
project: "seds"
Expand All @@ -32,6 +32,7 @@ resources:
Resources:
WaflogsUploadBucket:
Type: AWS::S3::Bucket
DeletionPolicy: Retain
Properties:
BucketName: !Sub ${AWS::AccountId}-${self:custom.stage}-waflogs
BucketEncryption:
Expand Down
8 changes: 4 additions & 4 deletions services/ui/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ provider:
name: aws
runtime: nodejs20.x
region: us-east-1
stackTags:
stackTags:
PROJECT: ${self:custom.project}
SERVICE: ${self:service}
SERVICE: ${self:service}

custom:
project: "seds"
Expand Down Expand Up @@ -168,7 +168,8 @@ resources:
aws:SecureTransport: false
Bucket: !Ref S3Bucket
LoggingBucket:
Type: "AWS::S3::Bucket"
Type: AWS::S3::Bucket
DeletionPolicy: Retain
Properties:
BucketName: !Sub ${self:service}-${self:custom.stage}-cloudfront-logs-${AWS::AccountId}
PublicAccessBlockConfiguration:
Expand All @@ -183,7 +184,6 @@ resources:
OwnershipControls:
Rules:
- ObjectOwnership: BucketOwnerPreferred
DeletionPolicy: Delete
LoggingBucketPolicy:
Type: "AWS::S3::BucketPolicy"
Properties:
Expand Down

0 comments on commit 26e76d5

Please sign in to comment.