With AWS Lambda you can create serverless functions in AWS.
For an introduction to Lambda see the AWS Lambda documentation
A distiction is made between the resource lambda, which is the infrastructre on AWS and the function itself, which is the running application part. So the Lambda resource is the container for the Lambda function.
For the Lambda Resource creation we use the CDK with go. See the chapter LAMBDA WITH CDK OVERVIEW for a detailed introduction.
This section is about the Lambda function written in go.
First Lambda function in GO
For a Lambda Function you need to create the infrastructure, that is the Lambda resource and connected resources. In the chapter Create a GO Lambda Resource in the AWS Console it is described how to do that in the console. I would recommend automating it. How to do that with the CDK in go is described in the chapter Lambda infrastructure with CDK. This section is about the deployment of the Lambda function itself.