https://pulumi.com logo
#aws
Title
# aws
s

steep-lamp-20408

09/22/2022, 3:17 AM
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

little-cartoon-10569

09/22/2022, 3:49 AM
I did a brief scan of the page. It all looks fairly benign. You'll have no troubles translating that to Pulumi.
🙌 1
s

steep-lamp-20408

09/22/2022, 3:50 AM
@little-cartoon-10569 thanks! the answer I needed
👍 1
(on a side note I’m always surprised how complicated things are with AWS 😅)
l

little-cartoon-10569

09/22/2022, 3:56 AM
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

steep-lamp-20408

09/22/2022, 3:57 AM
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

little-cartoon-10569

09/22/2022, 3:58 AM
Really? I thought API gateways needed VPCs.. huh, the things you learn...
s

steep-lamp-20408

09/22/2022, 4:08 AM
I’m not sure about all that, pretty new with AWS devops. Anyway, thanks again, it’s great help!