This page (revision-12) was last changed on 23-Apr-2022 17:06 by HarryMetske

This page was created on 23-Apr-2022 17:05 by Harry Metske

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
12 23-Apr-2022 17:06 3 KB HarryMetske to previous
11 23-Apr-2022 17:05 3 KB HarryMetske to previous | to last
10 23-Apr-2022 17:05 3 KB HarryMetske to previous | to last
9 23-Apr-2022 17:05 3 KB HarryMetske to previous | to last
8 23-Apr-2022 17:05 2 KB Harry Metske to previous | to last
7 23-Apr-2022 17:05 3 KB Harry Metske to previous | to last
6 23-Apr-2022 17:05 2 KB Harry Metske to previous | to last
5 23-Apr-2022 17:05 2 KB Harry Metske to previous | to last
4 23-Apr-2022 17:05 2 KB Harry Metske to previous | to last
3 23-Apr-2022 17:05 1 KB Harry Metske to previous | to last
2 23-Apr-2022 17:05 1 KB Harry Metske to previous | to last
1 23-Apr-2022 17:05 615 bytes Harry Metske to last

Page References

Incoming links Outgoing links
AWS Lambda...nobody

Version management

Difference between version and

At line 10 added one line
* [My sample Golang ALB lambda function on github|https://github.com/metskem/LambdaSample01]
At line 13 added 3 lines
* [Lambda Functions as Targets|https://docs.aws.amazon.com/elasticloadbalancing/latest/application/lambda-functions.html]
* [Respond to the Load Balancer|https://docs.aws.amazon.com/elasticloadbalancing/latest/application/lambda-functions.html#respond-to-load-balancer]
* [AWS Lambda pricing|https://aws.amazon.com/lambda/pricing/], $0.20 per 1M requests and $0.000016667 for every GB-second
At line 17 added one line
At line 16 changed one line
The code you write does not have to be reentrant, ''"If the function is invoked again while a request is still being processed, another instance is provisioned, increasing the function's concurrency."''\\
The code you write does not have to be re-entrant, ''"If the function is invoked again while a request is still being processed, another instance is provisioned, increasing the function's concurrency."''\\
You can specify a timeout during creation of your function.\\
At line 24 added one line
If you invoke your Lambda function via an ALB, you can use lb listener rules to send request to functions based of path or http headers, see [Using AWS Lambda with an Application Load Balancer|https://docs.aws.amazon.com/lambda/latest/dg/services-alb.html], for each Lambda function you need an lb tgt group.
At line 26 added 20 lines
To create a Lambda function you first create a Lambda function deployment package, a .zip file consisting of your code (a Go executable) and any dependencies:
{{{
GOOS=linux go build main.go
zip function.zip main
}}}
Allow the ALB to invoke your function:
{{{
aws lambda add-permission --function-name LambdaSample01 \
--statement-id load-balancer --action "lambda:InvokeFunction" \
--principal elasticloadbalancing.amazonaws.com
}}}
When coding a lambda in golang that responds to ALB events, make sure to use the [aws-lambda-go alb events|https://github.com/aws/aws-lambda-go/blob/master/events/alb.go]
At line 56 added one line
* What are layers?