Lono Summary - Summarize CloudFormation Template
This is a follow up to these posts:
- Summarize CloudFormation Required Parameters with jq
- Summarize CloudFormation Resources with jq Tip
- JSON to YAML One Liner
In the previous posts, we went over some jq tips with CloudFormation. We used jq to quickly summarize CloudFormation template parameters and resources. lono summary
automates that process and makes the command short and sweet.
First, you’ll need to be in a lono project. You can quickly generate one with:
lono new infra
cd infra
Let’s download and summarize the parameters for a simple CloudFormation template with a single EC2 instance.
$ lono import https://s3.amazonaws.com/cloudformation-templates-us-east-1/EC2InstanceWithSecurityGroupSample.template --name ec2
$ lono summary ec2
CloudFormation Template Summary:
Parameters:
Required:
KeyName (AWS::EC2::KeyPair::KeyName)
Optional:
InstanceType (String) Default: t2.small
SSHLocation (String) Default: 0.0.0.0/0
Resources:
1 AWS::EC2::Instance
1 AWS::EC2::SecurityGroup
Now another example, let’s download and summarize the parameters for a CloudFormation template with a typical AutoScaling stack.
$ lono import https://s3.amazonaws.com/cloudformation-templates-us-east-1/AutoScalingMultiAZWithNotifications.template --name asg
$ lono summary asg
CloudFormation Template Summary:
Parameters:
Required:
VpcId (AWS::EC2::VPC::Id)
Subnets (List<AWS::EC2::Subnet::Id>)
OperatorEMail (String)
KeyName (AWS::EC2::KeyPair::KeyName)
Optional:
InstanceType (String) Default: t2.small
SSHLocation (String) Default: 0.0.0.0/0
Resources:
2 AWS::AutoScaling::ScalingPolicy
2 AWS::CloudWatch::Alarm
1 AWS::AutoScaling::LaunchConfiguration
1 AWS::ElasticLoadBalancingV2::LoadBalancer
1 AWS::ElasticLoadBalancingV2::Listener
1 AWS::ElasticLoadBalancingV2::TargetGroup
1 AWS::SNS::Topic
1 AWS::EC2::SecurityGroup
1 AWS::AutoScaling::AutoScalingGroup
That’s it! The official documentation is at lono.cloud/reference/lono-summary. Hope that helps! 🎉
Related Post: Lono Xgraph Tutorial Introduction - Visualizing the Dependency Graph
Thanks for reading this far. If you found this article useful, I'd really appreciate it if you share this article so others can find it too! Thanks 😁 Also follow me on Twitter.
Got questions? Check out BoltOps.
You might also like
More tools:
-
Kubes
Kubes: Kubernetes Deployment Tool
Kubes is a Kubernetes Deployment Tool. It builds the docker image, creates the Kubernetes YAML, and runs kubectl apply. It automates the deployment process and saves you precious finger-typing energy.
-
Jets
Jets: The Ruby Serverless Framework
Ruby on Jets allows you to create and deploy serverless services with ease, and to seamlessly glue AWS services together with the most beautiful dynamic language: Ruby. It includes everything you need to build an API and deploy it to AWS Lambda. Jets leverages the power of Ruby to make serverless joyful for everyone.
-
Lono
Lono: The CloudFormation Framework
Building infrastructure-as-code is challenging. Lono makes it much easier and fun. It includes everything you need to manage and deploy infrastructure-as-code.