From b3dd246b7d83fd62856549646711e5328075c69a Mon Sep 17 00:00:00 2001 From: Gerhard Poul Date: Wed, 23 Dec 2020 21:13:26 +0100 Subject: [PATCH] Reword README about CloudWatch logging and a single comment fix (#347) * Fix comment in codepipeline test * Rephrase Lambda logging to CloudWatch Logs note in README files Co-authored-by: Gerhard Poul --- events/README_ALBTargetGroupEvents.md | 2 +- events/README_ApiGatewayEvent.md | 2 +- events/README_AutoScaling.md | 2 +- events/README_ClientVPN.md | 2 +- events/README_Cognito.md | 2 +- events/README_Cognito_UserPools_PostConfirmation.md | 2 +- events/README_Cognito_UserPools_PreAuthentication.md | 2 +- events/README_Cognito_UserPools_PreSignup.md | 2 +- events/README_Cognito_UserPools_PreTokenGen.md | 2 +- events/README_Config.md | 2 +- events/README_Connect.md | 2 +- events/README_Kinesis.md | 2 +- events/README_Lex.md | 2 +- events/README_S3.md | 2 +- events/README_S3_Batch_Job.md | 2 +- events/README_SES.md | 2 +- events/README_SNS.md | 2 +- events/README_SQS.md | 2 +- events/codepipeline_test.go | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/events/README_ALBTargetGroupEvents.md b/events/README_ALBTargetGroupEvents.md index 553d87e6..e0a48210 100644 --- a/events/README_ALBTargetGroupEvents.md +++ b/events/README_ALBTargetGroupEvents.md @@ -6,7 +6,7 @@ https://docs.aws.amazon.com/elasticloadbalancing/latest/application/lambda-funct # Sample Function -The following is a sample class and Lambda function that receives an ALB Target Group event as an input, writes some of the incoming data to CloudWatch Logs, and responds with a 200 status and the same body as the request. (Note that by default anything written to Console will be logged as CloudWatch Logs events.) +The following is a sample class and Lambda function that receives an ALB Target Group event as an input, writes some of the incoming data to CloudWatch Logs, and responds with a 200 status and the same body as the request. (Note that anything written to stdout or stderr will be logged as CloudWatch Logs events.) ```go diff --git a/events/README_ApiGatewayEvent.md b/events/README_ApiGatewayEvent.md index 65ceabce..1faaf598 100644 --- a/events/README_ApiGatewayEvent.md +++ b/events/README_ApiGatewayEvent.md @@ -4,7 +4,7 @@ API Gateway events consist of a request that was routed to a Lambda function by # Sample Function -The following is a sample class and Lambda function that receives Amazon API Gateway event record data as an input, writes some of the record data to CloudWatch Logs, and responds with a 200 status and the same body as the request. (Note that by default anything written to Console will be logged as CloudWatch Logs events.) +The following is a sample class and Lambda function that receives Amazon API Gateway event record data as an input, writes some of the record data to CloudWatch Logs, and responds with a 200 status and the same body as the request. (Note that anything written to stdout or stderr will be logged as CloudWatch Logs events.) ```go diff --git a/events/README_AutoScaling.md b/events/README_AutoScaling.md index dfc648b2..2835ada7 100644 --- a/events/README_AutoScaling.md +++ b/events/README_AutoScaling.md @@ -1,6 +1,6 @@ # Sample Function -The following is a sample Lambda function that receives an Auto Scaling event as an input and logs the EC2 instance ID to CloudWatch Logs. (Note that by default anything written to Console will be logged as CloudWatch Logs events.) +The following is a sample Lambda function that receives an Auto Scaling event as an input and logs the EC2 instance ID to CloudWatch Logs. (Note that anything written to stdout or stderr will be logged as CloudWatch Logs events.) ```go import ( diff --git a/events/README_ClientVPN.md b/events/README_ClientVPN.md index bd139b4d..ab8c0e39 100644 --- a/events/README_ClientVPN.md +++ b/events/README_ClientVPN.md @@ -1,6 +1,6 @@ # Sample Function -The following is a sample Lambda function that receives a Client VPN connection handler request as an input and then validates the IP address input and checks whether the connection source IP is on the allowed list defined as a map inside the function. If the source IP matches an allowed IP address it allows the access, otherwise an error message is presented to the user. Debug logs are generated to CloudWatch Logs. (Note that by default anything written to Console will be logged as CloudWatch Logs events.) +The following is a sample Lambda function that receives a Client VPN connection handler request as an input and then validates the IP address input and checks whether the connection source IP is on the allowed list defined as a map inside the function. If the source IP matches an allowed IP address it allows the access, otherwise an error message is presented to the user. Debug logs are generated to CloudWatch Logs. (Note that anything written to stdout or stderr will be logged as CloudWatch Logs events.) ```go import ( diff --git a/events/README_Cognito.md b/events/README_Cognito.md index a8ee5867..9a7249e8 100644 --- a/events/README_Cognito.md +++ b/events/README_Cognito.md @@ -1,6 +1,6 @@ # Sample Function -The following is a sample Lambda function that receives Amazon Cognito Sync event record data as an input and writes some of the record data to CloudWatch Logs. (Note that by default anything written to Console will be logged as CloudWatch Logs events.) +The following is a sample Lambda function that receives Amazon Cognito Sync event record data as an input and writes some of the record data to CloudWatch Logs. (Note that anything written to stdout or stderr will be logged as CloudWatch Logs events.) ```go diff --git a/events/README_Cognito_UserPools_PostConfirmation.md b/events/README_Cognito_UserPools_PostConfirmation.md index 34718374..0efab64f 100644 --- a/events/README_Cognito_UserPools_PostConfirmation.md +++ b/events/README_Cognito_UserPools_PostConfirmation.md @@ -1,6 +1,6 @@ # Sample Function -The following is a sample Lambda function that receives Amazon Cognito User Pools post-confirmation event as an input and writes some of the record data to CloudWatch Logs. (Note that by default anything written to Console will be logged as CloudWatch Logs events.) +The following is a sample Lambda function that receives Amazon Cognito User Pools post-confirmation event as an input and writes some of the record data to CloudWatch Logs. (Note that anything written to stdout or stderr will be logged as CloudWatch Logs events.) Please see instructions for setting up the Cognito triggers at https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html . diff --git a/events/README_Cognito_UserPools_PreAuthentication.md b/events/README_Cognito_UserPools_PreAuthentication.md index 1717508a..0e74214f 100644 --- a/events/README_Cognito_UserPools_PreAuthentication.md +++ b/events/README_Cognito_UserPools_PreAuthentication.md @@ -1,6 +1,6 @@ # Sample Function -The following is a sample Lambda function that receives Amazon Cognito User Pools pre-authentication event as an input and writes some of the record data to CloudWatch Logs. (Note that by default anything written to Console will be logged as CloudWatch Logs events.) +The following is a sample Lambda function that receives Amazon Cognito User Pools pre-authentication event as an input and writes some of the record data to CloudWatch Logs. (Note that anything written to stdout or stderr will be logged as CloudWatch Logs events.) Please see instructions for setting up the Cognito triggers at https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html . diff --git a/events/README_Cognito_UserPools_PreSignup.md b/events/README_Cognito_UserPools_PreSignup.md index a1c8492c..0d48499e 100644 --- a/events/README_Cognito_UserPools_PreSignup.md +++ b/events/README_Cognito_UserPools_PreSignup.md @@ -1,6 +1,6 @@ # Sample Function -The following is a sample Lambda function that receives Amazon Cognito User Pools pre-signup event as an input and writes some of the record data to CloudWatch Logs. (Note that by default anything written to Console will be logged as CloudWatch Logs events.) +The following is a sample Lambda function that receives Amazon Cognito User Pools pre-signup event as an input and writes some of the record data to CloudWatch Logs. (Note that anything written to stdout or stderr will be logged as CloudWatch Logs events.) Please see instructions for setting up the Cognito triggers at https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html . diff --git a/events/README_Cognito_UserPools_PreTokenGen.md b/events/README_Cognito_UserPools_PreTokenGen.md index 1cbbaf45..f42cba02 100644 --- a/events/README_Cognito_UserPools_PreTokenGen.md +++ b/events/README_Cognito_UserPools_PreTokenGen.md @@ -1,6 +1,6 @@ # Sample Function -The following is a sample Lambda function that receives Amazon Cognito User Pools pre-token-gen event as an input and writes some of the record data to CloudWatch Logs. (Note that by default anything written to Console will be logged as CloudWatch Logs events.) +The following is a sample Lambda function that receives Amazon Cognito User Pools pre-token-gen event as an input and writes some of the record data to CloudWatch Logs. (Note that anything written to stdout or stderr will be logged as CloudWatch Logs events.) Please see instructions for setting up the Cognito triggers at https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html . diff --git a/events/README_Config.md b/events/README_Config.md index e2d217a9..e8d08330 100644 --- a/events/README_Config.md +++ b/events/README_Config.md @@ -1,6 +1,6 @@ # Sample Function -The following is a sample Lambda function that receives Amazon Config event record data as an input and writes some of the record data to CloudWatch Logs. (Note that by default anything written to Console will be logged as CloudWatch Logs events.) +The following is a sample Lambda function that receives Amazon Config event record data as an input and writes some of the record data to CloudWatch Logs. (Note that anything written to stdout or stderr will be logged as CloudWatch Logs events.) ```go diff --git a/events/README_Connect.md b/events/README_Connect.md index e33b144a..9e4c92b0 100644 --- a/events/README_Connect.md +++ b/events/README_Connect.md @@ -1,6 +1,6 @@ # Sample Function -The following is a sample Lambda function that receives an Amazon Connect event as an input and writes some of the record data to CloudWatch Logs. (Note that by default anything written to Console will be logged as CloudWatch Logs events.) +The following is a sample Lambda function that receives an Amazon Connect event as an input and writes some of the record data to CloudWatch Logs. (Note that anything written to stdout or stderr will be logged as CloudWatch Logs events.) ```go package main diff --git a/events/README_Kinesis.md b/events/README_Kinesis.md index 4dd23b20..7133d4b5 100644 --- a/events/README_Kinesis.md +++ b/events/README_Kinesis.md @@ -1,6 +1,6 @@ # Sample Function -The following is a sample class and Lambda function that receives Amazon Kinesis event record data as an input and writes some of the record data to CloudWatch Logs. (Note that by default anything written to Console will be logged as CloudWatch Logs events.) +The following is a sample class and Lambda function that receives Amazon Kinesis event record data as an input and writes some of the record data to CloudWatch Logs. (Note that anything written to stdout or stderr will be logged as CloudWatch Logs events.) ```go diff --git a/events/README_Lex.md b/events/README_Lex.md index abcc07aa..88d04e9a 100644 --- a/events/README_Lex.md +++ b/events/README_Lex.md @@ -1,7 +1,7 @@ # Sample Function -The following is a sample class and Lambda function that receives Amazon Lex event data as input, writes some of the record data to CloudWatch Logs, and responds back to Lex. (Note that by default anything written to Console will be logged as CloudWatch Logs events.) +The following is a sample class and Lambda function that receives Amazon Lex event data as input, writes some of the record data to CloudWatch Logs, and responds back to Lex. (Note that anything written to stdout or stderr will be logged as CloudWatch Logs events.) ```go import ( diff --git a/events/README_S3.md b/events/README_S3.md index e533176e..ac36ab0d 100644 --- a/events/README_S3.md +++ b/events/README_S3.md @@ -1,6 +1,6 @@ # Sample Function -The following is a sample class and Lambda function that receives Amazon S3 event record data as an input and writes some of the record data to CloudWatch Logs. (Note that by default anything written to Console will be logged as CloudWatch Logs events.) +The following is a sample class and Lambda function that receives Amazon S3 event record data as an input and writes some of the record data to CloudWatch Logs. (Note that anything written to stdout or stderr will be logged as CloudWatch Logs events.) ```go diff --git a/events/README_S3_Batch_Job.md b/events/README_S3_Batch_Job.md index 589bd27a..19e4549d 100644 --- a/events/README_S3_Batch_Job.md +++ b/events/README_S3_Batch_Job.md @@ -1,6 +1,6 @@ # Sample Function -The following is a sample class and Lambda function that receives Amazon S3 event record data as an input and writes some of the record data to CloudWatch Logs. (Note that by default anything written to Console will be logged as CloudWatch Logs events.) +The following is a sample class and Lambda function that receives Amazon S3 event record data as an input and writes some of the record data to CloudWatch Logs. (Note that anything written to stdout or stderr will be logged as CloudWatch Logs events.) ```go diff --git a/events/README_SES.md b/events/README_SES.md index ddfaed94..dd471184 100644 --- a/events/README_SES.md +++ b/events/README_SES.md @@ -1,7 +1,7 @@ # Sample Function -The following is a sample class and Lambda function that receives Amazon SES event message data as input, writes some of the message data to CloudWatch Logs, and responds with a 200 status and the same body as the request. (Note that by default anything written to Console will be logged as CloudWatch Logs events.) +The following is a sample class and Lambda function that receives Amazon SES event message data as input, writes some of the message data to CloudWatch Logs, and responds with a 200 status and the same body as the request. (Note that anything written to stdout or stderr will be logged as CloudWatch Logs events.) ```go package main diff --git a/events/README_SNS.md b/events/README_SNS.md index f198793d..924250c8 100644 --- a/events/README_SNS.md +++ b/events/README_SNS.md @@ -1,7 +1,7 @@ # Sample Function -The following is a sample class and Lambda function that receives Amazon SNS event record data as input, writes some of the record data to CloudWatch Logs, and responds with a 200 status and the same body as the request. (Note that by default anything written to Console will be logged as CloudWatch Logs events.) +The following is a sample class and Lambda function that receives Amazon SNS event record data as input, writes some of the record data to CloudWatch Logs, and responds with a 200 status and the same body as the request. (Note that anything written to stdout or stderr will be logged as CloudWatch Logs events.) ```go import ( diff --git a/events/README_SQS.md b/events/README_SQS.md index e5340f3a..d852b16e 100644 --- a/events/README_SQS.md +++ b/events/README_SQS.md @@ -1,7 +1,7 @@ # Sample Function -The following is a sample class and Lambda function that receives Amazon SQS event message data as input, writes some of the message data to CloudWatch Logs, and responds with a 200 status and the same body as the request. (Note that by default anything written to Console will be logged as CloudWatch Logs events.) +The following is a sample class and Lambda function that receives Amazon SQS event message data as input, writes some of the message data to CloudWatch Logs, and responds with a 200 status and the same body as the request. (Note that anything written to stdout or stderr will be logged as CloudWatch Logs events.) ```go package main diff --git a/events/codepipeline_test.go b/events/codepipeline_test.go index cf7dfed4..c958d172 100644 --- a/events/codepipeline_test.go +++ b/events/codepipeline_test.go @@ -18,7 +18,7 @@ func TestCodePipeLineEventMarshaling(t *testing.T) { t.Errorf("could not open test file. details: %v", err) } - // de-serialize into CognitoEvent + // de-serialize into CodePipelineEvent var inputEvent CodePipelineEvent if err := json.Unmarshal(inputJSON, &inputEvent); err != nil { t.Errorf("could not unmarshal event. details: %v", err)