From 8c6fe5a56c1093ed74b220e39cea252062547414 Mon Sep 17 00:00:00 2001 From: Luciano Mammino Date: Mon, 18 Dec 2023 19:47:28 +0100 Subject: [PATCH] chore: fixed broken inline python code in cdk example --- docs/deploy.md | 2 +- examples/cdk-from-sar/lib/cdk-stack.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/deploy.md b/docs/deploy.md index 76c728e..dfb2f45 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -125,7 +125,7 @@ const sampleApiLambda2 = new aws_lambda.Function(this, 'sampleApiLambda2', { handler: 'index.handler', code: aws_lambda.Code.fromInline(` def handler(event, context): -return {'body': 'Hello ' + event['requestContext']['authorizer']['principalId'] + ' from endpoint2!\nThese are your claims: ' + event['requestContext']['authorizer']['jwtClaims'], 'statusCode': 200} +return {'body': 'Hello ' + event['requestContext']['authorizer']['principalId'] + ' from endpoint2! These are your claims: ' + event['requestContext']['authorizer']['jwtClaims'], 'statusCode': 200} `) }); diff --git a/examples/cdk-from-sar/lib/cdk-stack.ts b/examples/cdk-from-sar/lib/cdk-stack.ts index 149304e..5f2aa28 100644 --- a/examples/cdk-from-sar/lib/cdk-stack.ts +++ b/examples/cdk-from-sar/lib/cdk-stack.ts @@ -70,7 +70,7 @@ def handler(event, context): handler: 'index.handler', code: aws_lambda.Code.fromInline(` def handler(event, context): - return {'body': 'Hello ' + event['requestContext']['authorizer']['principalId'] + ' from endpoint2!\nThese are your claims: ' + event['requestContext']['authorizer']['jwtClaims'], 'statusCode': 200} + return {'body': 'Hello ' + event['requestContext']['authorizer']['principalId'] + ' from endpoint2! These are your claims: ' + event['requestContext']['authorizer']['jwtClaims'], 'statusCode': 200} `) });