build golang code in container, and deploy a lambda function with role default.
{
"LAMBDA_FUNCTION_NAME": "your_function_name_her",
"ROLE_NAME": "your_role_name_her"
}
Build goland code and save the exec in folder .build, with name main
- download code in main folder of your project.
- in folder need have basic files: main.go, go.mod, go.sum
- main.go with lambda.Start(handlerRequest)
- create file .json and set the parameters required *optional
terraform init
terraform plan -env-file="<nameFile>.json"
terraform apply -env-file="<nameFile>.json"
terraform destroy -env-file="<nameFile>.json"
function_name
function_arn