Give Lambda a static IP #16506
-
I need to give my lambda static IP so that it can be whitelisted by another service. I have an existing VPC and have created the Lambda function. Then I created a private subnet using the ec2 class and added a nat gateway to it..
Here are my issues... Anyway, just kinda lost ovrall. Let me know if you have any tips or examples. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Please view our API ref on EC2, it should answer your questions. For example, the return type of addNatGateway will reveal the id from this prop https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnNatGateway.html#attrnatgatewayid. You can add routes to the subnet with the addRoute method Docs on internet gateway here https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2-readme.html#accessing-the-internet-gateway |
Beta Was this translation helpful? Give feedback.
Please view our API ref on EC2, it should answer your questions. For example, the return type of addNatGateway will reveal the id from this prop https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnNatGateway.html#attrnatgatewayid.
You can add routes to the subnet with the addRoute method
Docs on internet gateway here https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2-readme.html#accessing-the-internet-gateway