This project is a small Go command-line tool that lists the resources inside an AWS CloudFormation stack and shows their current status.
It is built to demonstrate basic Go structure, AWS SDK usage, and interaction with AWS CloudFormation.
- Accepts a CloudFormation stack name as a command-line argument
- Calls the AWS CloudFormation API
- Retrieves all resources in the stack
- Prints each resource’s logical ID and status in a table
Example output:
Logical ID Status
---------- -----------
MySNSTopic CREATE_COMPLETE
MyLambdaFunction CREATE_COMPLETE
MyLambdaRole CREATE_COMPLETE
This project was built to practice:
- Using the AWS SDK for Go
- Working with CloudFormation programmatically
- Structuring a small Go CLI tool
- Handling AWS configuration and API calls
- Returning structured data and formatting output
Stack Resource Lister
├── main/
│ └── main.go # CLI entry point
├── stacks.go # CloudFormation logic
├── testdata/
│ └── template.yml # Sample CloudFormation template
├── go.mod
└── go.sum
- AWS credentials and configuration are loaded using the default AWS config
- A CloudFormation client is created using the AWS SDK for Go
- The tool calls
DescribeStackResources - Each resource’s logical ID and status are collected and printed
-
Go installed
-
AWS credentials configured locally
- (via AWS CLI, environment variables, or shared config)
-
An existing CloudFormation stack
go run main/main.go <stack-name>Example:
go run main/main.go my-cloudformation-stack- This tool assumes AWS credentials are already configured
- It focuses on clarity and learning rather than full production features
- Error handling is kept simple and explicit
This project is intentionally small.
It is meant to demonstrate:
- Basic Go application structure
- AWS SDK usage
- CloudFormation resource inspection
- Clear input/output handling in a CLI tool
It is not intended to be a full product