Skip to content

Commit 1f3112d

Browse files
author
ChadKluck
committed
updated api gateway execution logs to use aws default
1 parent 985d67f commit 1f3112d

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

application-infrastructure/template.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Atlantis for AWS SAM Deployments
66
# Starter 02 - API Gateway and Lambda using Cache-Data (NodeJS)
77
# Author: Chad Kluck - 63klabs.net
8-
# Version: v2.0.2/2025-07-26
8+
# Version: v2.0.4/2025-09-03
99

1010
# Documentation, Issues/Feature Requests, Latest Updates, and Security Reports on GitHub:
1111
# https://github.com/63Klabs/atlantis-starter-02-apigw-lambda-cache-data-nodejs
@@ -57,13 +57,14 @@ Metadata:
5757
- FunctionArchitecture
5858
-
5959
Label:
60-
default: "Application Settings"
60+
default: "Application Parameters"
6161
Parameters:
6262
- ApiPathBase
6363
- UserAgent
6464
- LogRetentionInDaysForPROD
6565
- LogRetentionInDaysForDEVTEST
6666
- ApiGatewayLoggingEnabled
67+
- ApiGatewayLoggingEnabled
6768
-
6869
Label:
6970
default: "Cache-Data Settings"
@@ -198,7 +199,7 @@ Parameters:
198199
AllowedValues: ["x86_64", "arm64"]
199200

200201
# ---------------------------------------------------------------------------
201-
# Application Settings
202+
# Application Parameters
202203

203204
ApiPathBase:
204205
Type: String
@@ -384,7 +385,7 @@ Resources:
384385
"Fn::Transform":
385386
Name: "AWS::Include"
386387
Parameters:
387-
Location: ./template-swagger.yml
388+
Location: ./template-openapi-spec.yml
388389

389390
# -- The following adds two levels of logging to API Gateway --
390391
# -- However, an account admin will need to add a service role to allow API Gateway to write to CloudWatch logs --
@@ -424,7 +425,7 @@ Resources:
424425
DeletionPolicy: !If [IsProduction, Retain, Delete]
425426
UpdateReplacePolicy: Retain
426427
Properties:
427-
LogGroupName: !Sub '/aws/apigateway/${Prefix}-${ProjectId}-${StageId}-WebApi-execution-logs' # <-- consistent naming | aws default --> 'API-Gateway-Execution-Logs_${WebApi}/${ApiPathBase}'
428+
LogGroupName: !Sub 'API-Gateway-Execution-Logs_${WebApi}/${ApiPathBase}' # AWS default
428429
RetentionInDays: !If [ IsProduction, !Ref LogRetentionInDaysForPROD, !Ref LogRetentionInDaysForDEVTEST]
429430

430431
# ---------------------------------------------------------------------------
@@ -697,7 +698,7 @@ Outputs:
697698
CloudWatchApiGatewayExecutionLogGroup:
698699
Condition: ApiGatewayLoggingIsEnabled
699700
Description: "Cloud Watch Log Group for API Gateway Execution Logs"
700-
Value: !Sub "https://console.aws.amazon.com/cloudwatch/home?region=${AWS::Region}#logStream:group=%2Faws%2Fapigateway%2F${Prefix}-${ProjectId}-${StageId}-WebApi-execution-logs"
701+
Value: !Sub "https://console.aws.amazon.com/cloudwatch/home?region=${AWS::Region}#logStream:group=%2Faws%2Fapigateway%2FAPI-Gateway-Execution-Logs_${WebApi}/${ApiPathBase}"
701702

702703
CloudWatchApiGatewayAccessLogGroup:
703704
Condition: ApiGatewayLoggingIsEnabled

0 commit comments

Comments
 (0)