File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ export class CdkAppStack extends cdk.Stack {
113113 } ) ;
114114
115115 const lambdaAppLogs = new logs . LogGroup ( this , 'LambdaApplicationLogs' , {
116- logGroupName : `/aws/lambda/${ lambda_backend . functionName } -application ` ,
116+ logGroupName : `/aws/lambda/${ lambda_backend . functionName } ` ,
117117 encryptionKey,
118118 retention : logs . RetentionDays . ONE_MONTH ,
119119 removalPolicy : RemovalPolicy . RETAIN ,
Original file line number Diff line number Diff line change @@ -42,12 +42,12 @@ export const handler = async (
4242 event : APIGatewayEvent ,
4343 context : Context
4444) : Promise < APIGatewayProxyResult > => {
45- try {
46- const correlationId =
47- event . headers ?. [ 'x-correlation-id' ] ||
48- event . headers ?. [ 'X-Correlation-Id' ] ||
49- context . awsRequestId ;
45+ const correlationId =
46+ event . headers ?. [ 'x-correlation-id' ] ||
47+ event . headers ?. [ 'X-Correlation-Id' ] ||
48+ context . awsRequestId ;
5049
50+ try {
5151 log ( 'INFO' , 'request-received' , {
5252 awsRequestId : context . awsRequestId ,
5353 correlationId,
@@ -81,6 +81,7 @@ export const handler = async (
8181 headers : {
8282 'Content-Type' : 'application/json' ,
8383 'Access-Control-Allow-Origin' : '*' ,
84+ 'x-correlation-id' : correlationId ,
8485 } ,
8586 body : JSON . stringify ( { error : 'Internal Server Error' } ) ,
8687 } ;
You can’t perform that action at this time.
0 commit comments