Hey all, I need to generate a static outbound IP ...
# aws
s
Hey all, I need to generate a static outbound IP address for my AWS Lambda deployed with Pulumi. I read this article from AWS : https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/generate-a-static-ou[…]mbda-function-amazon-vpc-and-a-serverless-architecture.html Is it possible with Pulumi to do so?
l
I did a brief scan of the page. It all looks fairly benign. You'll have no troubles translating that to Pulumi.
🙌 1
s
@little-cartoon-10569 thanks! the answer I needed
👍 1
(on a side note I’m always surprised how complicated things are with AWS 😅)
l
If you haven't already created any of the resources involved, you might be tempted to use awsx.ec2.Vpc to do most of the heavy lifting for you. It's a great resource if you just want to "fire and forget" your VPC, subnets, etc. I think it will create all the resources you need, except that final lambda. Note that you may find you need to configure some of those resources more than awsx allows you do (it's a convention-over-configuration library): there is a slight risk that you might have to give up on awsx and do the whole thing in aws.
💯 1
However, I think it's probably worth the risk? It will do 90% of the work in a single resource.
s
Good to know. I have indeed already the lambda and the API Gateway, but not the VPC, subnets, etc.
I’ll probably try that way first
l
Really? I thought API gateways needed VPCs.. huh, the things you learn...
s
I’m not sure about all that, pretty new with AWS devops. Anyway, thanks again, it’s great help!