Sample CDK script with Go to create a Lambda function in Go.
.
├── cdk-lambda-go.go # main code to define stacks
├── cdk-lambda-go_test.go # test code
├── cdk.json # CDK settings
└── lambda # resources for Lambda
└── handler.goDeploy Stack
cdk deployTest
aws sqs send-message --queue-url <SQS URL> --message-body "Test message."then, you can find the following log in CloudWatch:
The message <MessageId> for event source aws:sqs = Test message.cdk deploydeploy this stack to your default AWS account/regioncdk diffcompare deployed stack with current statecdk synthemits the synthesized CloudFormation templatego testrun unit tests