-
Notifications
You must be signed in to change notification settings - Fork 998
New serverless pattern - private-apigw-public-custom-domain added #2828
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
base: main
Are you sure you want to change the base?
New serverless pattern - private-apigw-public-custom-domain added #2828
Conversation
c44c325
to
be4bb6c
Compare
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.
Can this be removed?
This architecture is intended for: | ||
- **Internal APIs**: APIs that should only be accessible from within your network | ||
- **Hybrid Connectivity**: APIs accessible from on-premises via VPN/Direct Connect | ||
- **Public DNS Resolution**: APIs that resolve publicly but are only accessible privately |
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.
What's the use-case for this?
- **Hybrid Connectivity**: APIs accessible from on-premises via VPN/Direct Connect | ||
- **Public DNS Resolution**: APIs that resolve publicly but are only accessible privately | ||
|
||
Learn more about this pattern at Serverless Land Patterns: << Add the live URL here >> |
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.
Please replace with the actual url using your folder name
## Troubleshooting | ||
|
||
### Certificate Issues | ||
- Ensure certificate is in the same region as deployment |
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.
- Ensure certificate is in the same region as deployment | |
- Ensure certificate is in the same region |
|
||
### Lambda Function Issues | ||
- Check CloudWatch logs for the RegisterVPCEndpointTargets function | ||
- Verify IAM permissions for EC2 and ELB operations |
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.
what exactly is necessary here?
2. **AWS CDK**: Installed and AWS Account bootstrapped | ||
3. **ACM Certificate**: Valid certificate for your domain in the deployment region | ||
4. **AWS CLI**: Configured with appropriate permissions |
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.
Add relevant links to the documentation. Compare to other submissions for style guide
|
||
#### Outputs | ||
|
||
The stack provides these outputs: |
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.
Are these all necessary?
"elasticloadbalancing:DeregisterTargets", | ||
"elasticloadbalancing:DescribeTargetHealth" | ||
], | ||
resources=["*"] |
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.
can this be restricted to the current account and region?
# Lambda function to register VPC endpoint IPs as targets | ||
register_targets_function = _lambda.Function( | ||
self, "RegisterVPCEndpointTargets", | ||
runtime=_lambda.Runtime.PYTHON_3_9, |
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.
Use the most up-to-date version
## Security Features | ||
|
||
- API only accessible through VPC endpoint | ||
- Security groups restrict access to VPC and Client VPN ranges |
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.
Isn't the ALB Security group allowing traffic from anywhere?
Issue #, if available: #2824
Description of changes:
This pattern creates an Amazon Private API Gateway that is only accessible through VPC endpoints, with public custom domain name resolution for internal only access through an Amazon internal Application Load Balancer.
This architecture is intended for:
Internal APIs: APIs that should only be accessible from within your network
Client VPN Access: APIs accessible via AWS Client VPN connections
Hybrid Connectivity: APIs accessible from on-premises via VPN/Direct Connect
Public DNS Resolution: APIs that resolve publicly but are only accessible privately
This is a joint pattern by http://github.com/bquintas and https://github.com/Sliiiin
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.