Stacksets + custom resources = run lambda function in all your accounts easy

Just like it says, I needed to run a bit of code to tag all of the VPN connections in my accounts(I use a transit VPC). I have stacksets set up, took a simple C.F. demo for creating lambda based custom resources, swapped in my python function, boom ran code in all my accounts.

Could have done it with an assumerole but I’ve avoided setting that up since it would violate our AD federated identities only model.

I’m loving stacksets and had to share this trick, makes it possible to do everything from your master! We also use AWS Organizations and I can deploy C.F. templates against an org. Pretty cool stuff.


Related discussions:

Love it! Can you write up in a blog post and share?

Sure, I will write something up and post it here.

We’re looking forward to it.

https://www.linkedin.com/pulse/running-aws-lambda-function-multiple-accounts-eric-moore

https://www.linkedin.com/pulse/running-aws-lambda-function-multiple-accounts-eric-moore

Looks awesome – just tweeted it: https://twitter.com/jeffbarr/status/903030605146763265

Thanks so much for taking the time to do this.

Thanks! I am going to start blogging regularly, thanks for encouraging me!