You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Application Load balancer with AWS Lambda as target with Terraform
2
+
3
+
This pattern demonstrates how to create an Application Load Balancer with AWS Lambda as target. Implemented in Terraform.
4
+
5
+
Learn more about this pattern at Serverless Land Patterns: https://serverlessland.com/patterns/alb-lambda-terraform
6
+
7
+
Important: this application uses various AWS services and there are costs associated with these services after the Free Tier usage - please see the [AWS Pricing page](https://aws.amazon.com/pricing/) for details. You are responsible for any AWS costs incurred. No warranty is implied in this example.
8
+
9
+
## Requirements
10
+
11
+
*[Create an AWS account](https://portal.aws.amazon.com/gp/aws/developer/registration/index.html) if you do not already have one and log in. The IAM user that you use must have sufficient permissions to make necessary AWS service calls and manage AWS resources.
12
+
*[AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) installed and configured
1. In the stack output, you can see `alb_url`. When you access the url, you should see the response "Hello World" from Lambda.
42
+
43
+
** Please note: Application Load Balancer's default settings for health check are 5 consecutive health check successes with 35 seconds interval. So, it will take couple of minutes for the target to be healthy.
44
+
45
+
## Cleanup
46
+
47
+
1. To delete the stack, run:
48
+
```bash
49
+
terraform destroy --auto-approve
50
+
```
51
+
----
52
+
Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
0 commit comments