CloudFormation: functions like ImportValue and GetAtt inside a Sub

Hello! In CloudFormation, I think !Sub is the best way to generate strings that contain dynamic values. It's better to interpolate, like this: Than to join, like this: Both are common solutions, ${SG} resolves to the same value as !Ref SG, but I think interpolation is the right tool here. Join is better for other … Continue reading CloudFormation: functions like ImportValue and GetAtt inside a Sub

CloudFormation Custom Resources: Avoiding the Two Hour Exception Timeout

If you're new to custom resources check out this complete example first. There's a gotcha when writing CloudFormation Custom Resources that's easy to miss and if you miss it your stack can get stuck, ignoring its timeout setting. It'll fail on its own after an hour, but if it tries to roll back you have … Continue reading CloudFormation Custom Resources: Avoiding the Two Hour Exception Timeout