Amazon Web Services (AWS) has enhanced its CloudFormation service by adding a new deployment timeline view. The new view gives developers and cloud engineers a more intuitive way to track and understand the infrastructure deployment process, including new insights into dependencies.
CloudFormation, introduced as AWS's Infrastructure as Code (IaC) service in 2011, allows developers to model and provision cloud resources using JSON or YAML templates. The new view visually represents resource provisioning, allowing users to see precisely how their cloud infrastructure is being created, updated, or deleted in real-time. Unlike regular text-based event logs, this timeline provides a graphical view that shows the precise sequence and dependencies of resource deployments.
(Screenshot courtesy of AWS)
Writing in a blog post, Idriss Laouali Abdou from AWS explains how the new view has the following benefits for engineers managing cloud infrastructure:
- Real-time Visualisation: As CloudFormation provisions resources, users can watch this progress visually; the timeline updates every five seconds. The timeline displays resources vertically, with horizontal coloured bars representing each resource's deployment status.
- Colour-coded Status Indicators: The colour of the resource deployment bars represents their current state, with blue used for in-progress, yellow for items undergoing consistency checks, green for successful completion, and red for failures.
- Detailed Resource Information: Users can hover over any bar to see more details, including full resource names, start and end times of the deployment, and deployment phases.
- Failure Identification: In case of a failure, the timeline highlights the likely root cause resource with a red-and-white striped bar, enabling quick troubleshooting.
(Screenshot courtesy of AWS)
The deployment timeline represents an improvement over Cloud administrators having to work with the text-based event logs that CloudFormation emits. Interpreting these could be challenging, especially in complex infrastructure setups with multiple interconnected resources.
The timeline is displayed within the AWS CloudFormation Console. Users can access the timeline inside this console by navigating to the Events tab and selecting the Timeline view. The new view shows stack create, update, and delete operations across all AWS regions where CloudFormation is available.
The introductory blog post shows in detail how the timeline works during a sample deployment, including visualising how resources are provisioned in a specific order. For instance, in a sample application stack, networking resources like VPC and internet gateway were created first, followed by security groups, subnets, and finally, the EC2 instance. The article continues by listing some of the benefits of the new visualisation. These include improving the cloud engineer's understanding of complex deployment sequences, including how dependencies relate to each other, quickly identifying deployment problems, and reducing time spent interpreting complex deployment logs.
A novel aspect of the timeline is how it displays the "resource consistency check" phase. This period allows CloudFormation to ensure that resources are fully operational before marking them as complete. For example, the documentation showed an internet gateway resource taking two seconds to create, with an additional 15-second stabilisation check.
Writing on LinkedIn, Tasleem Hussein is looking forward to the timeline visualisation solving a frequent problem for him:
I like to know what my code is doing, but when deployments take two minutes longer in TEST than in DEV, I start questioning my life choices. Sound familiar? Fear not!
- Tasleem Hussein
Nhyl Bryle Ibañez is effusive, claiming on LinkedIn that the new timeline view has significantly aided his understanding:
The new timeline view in CloudFormation is a sweet addition! I finally understand how the status works in the events.
AWS Director of Product Management Massimo Re Ferrè has also written an extensive blog post on using the new timeline visualisation, exploring its potential when combined with generative AI to improve CloudFormation deployments. The author experiments with uploading a screenshot of the timeline view into Claude.ai, together with the original template and a list of the resultant deployment events.
His experiments demonstrate several use cases for using generative AI with CloudFormation, with some benefits coming from the new timeline view - for example:
- Stack Summaries: AI can help decode unfamiliar infrastructure by summarising deployment resources and their sequencing.
- Timeline Exploration: AI helped to explain some seemingly cryptic deployment details in his example, such as why some security groups weren't deployed together, and other obscure deployment timings and dependencies
- Visual Dependency Mapping: Claude.ai generated dependency trees to help engineers visualise relationships better
The experiment did show some weaknesses of this approach - with the AI hallucinating sometimes and making bad recommendations, but the author was impressed with the AI's ability to explain code.
A final quote from Benjamin Wood on LinkedIn gives insight into the value of the new view when using AWS CDK:
"This will be a nice visual helper to watch how CDK-managed Stacks deploy. The event grid on a 100+ resource Stack has the information, but isn’t digestible. This will absolutely help.
The deployment timeline view is now available through the CloudFormation console, in all AWS regions that support CloudFormation.