AWS CloudFormation announces looping capability with Fn::ForEach intrinsic function. With Fn::ForEach, you can replicate parts of your templates with minimal lines of code. You can use Fn::ForEach to simplify your template layout and make it easier and faster for you and your peers to review your code. Fn::ForEach helps reduce human errors such as updating wrong properties or missing out on updating multiple target properties in your template.
Source:: Amazon AWS