-
Notifications
You must be signed in to change notification settings - Fork 1k
New serverless pattern - apigw-rest-vpclink-pvt-alb-sam #2870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New serverless pattern - apigw-rest-vpclink-pvt-alb-sam #2870
Conversation
This pattern demonstrates how to integrate a REST API Gateway with a private Application Load Balancer and ECS Fargate cluster using VPC Link V2. Key features: - REST API Gateway with proxy integration - VPC Link V2 for private integration - Private ALB routing to ECS Fargate - Security groups and IAM roles - Uses existing VPC and subnets
This pattern demonstrates how to integrate a REST API Gateway with a private Application Load Balancer and ECS Fargate cluster using VPC Link V2. Key features: - REST API Gateway with proxy integration - VPC Link V2 for private integration - Private ALB routing to ECS Fargate - Security groups and IAM roles - AWS SAM implementation - Uses existing VPC and subnets
|
@agawanea This PR mentions the SAM implementation, but I also see a TF directory included. Which one is correct? |
The Terraform implementation is in a separate branch/PR. This branch should only contain the SAM implementation of the apigw-rest-vpclink-pvt-alb pattern.
|
Removed the terraform pattern. This PR is only for SAM pattern. Terraform is in different PR |
|
Thanks. I started testing the SAM template and am encountering this error: As I looked through the template, the APIGW resource isn't a "SAM" APIGW resource, it is a standard CloudFormation resource. Is there a chance to convert the APIGW resource to AWS::Serverless::API and define the API with an OpenAPI spec file? |
- Replace CloudFormation API Gateway resources with AWS::Serverless::Api - Add external OpenAPI definition file (api.yaml) with AWS::Include transform - Add integrationTarget parameter for VPC Link V2 to ALB integration - Update README to document SAM resource usage and OpenAPI file - Update testing instructions with correct path examples - Update copyright year to 2025 - Tested and validated: API Gateway -> VPC Link V2 -> Internal ALB -> ECS working correctly
|
Added the SAM resource and tested it to be working fine now |
ellisms
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @agawanea - requesting a few remaining changes before we can publish.
- Use full AWS service names throughout (Amazon API Gateway, Amazon VPC Link V2, Amazon Application Load Balancer, Amazon ECS) - Add problem statement explaining VPC Link V2 eliminates NLB requirement - Add --capabilities CAPABILITY_NAMED_IAM flag to deployment command - Simplify outputs to only include REST API endpoint URL - Update copyright year to 2026
|
Thanks @agawanea . I'll add this to the publishing queue. |
Issue #, if available:
#2871
This pattern demonstrates REST API Gateway integration with a private Application Load Balancer and ECS Fargate cluster using VPC Link V2 (SAM implementation).
What's included:
Tested in: us-east-1
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.