- Newest
- Most votes
- Most comments
Lambda Function URLs do not support non-TLS endpoints. They are designed to be secure by default and only support HTTPS connections. The "HTTP(S)" notation in the documentation refers to the protocol used, but in practice, all Function URLs use HTTPS.
To solve your issue with regional custom domains and Lambda Function URLs, you have a few options:
-
Use API Gateway with Lambda integration: This would allow you to use custom domain names and TLS certificates, but you'd lose the streaming capability and be subject to the 6MB size limit.
-
Use Application Load Balancer (ALB): As you mentioned, this could solve the issue by allowing you to use custom domain names and certificates, but it would incur additional costs.
-
Use Amazon CloudFront with Lambda Function URLs: You can set up a CloudFront distribution with your Lambda Function URL as the origin. Then, configure a custom domain name for the CloudFront distribution and use your own SSL/TLS certificate. This approach allows you to keep the streaming capability of Lambda Function URLs while using your custom domain.
-
Implement a reverse proxy: You could set up a lightweight reverse proxy (e.g., using AWS Fargate or EC2) that forwards requests to your Lambda Function URL. This proxy can use your custom domain and certificate.
Given your requirements and desire to avoid additional costs, the CloudFront approach (option 3) might be the most suitable solution. It allows you to use custom domains, manage certificates, and maintain the streaming capability of Lambda Function URLs without significant additional costs.
Sources
Can a Lambda Function URL with IAM auth type be invoked with authorization query parameters? | AWS re:Post
AWS Lambda controls - AWS Control Tower
A Lambda function that invoke another lambda function failed on cloud but working locally with sam invoke | AWS re:Post
I ended up solving this with Lambda @ Edge https://aws.amazon.com/blogs/networking-and-content-delivery/dynamically-route-viewer-requests-to-any-origin-using-lambdaedge/
Relevant content
- asked 3 years ago
- asked 4 years ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 9 months ago
