DEV Community

kawasaki031677
kawasaki031677

Posted on

Analyzing CloudFormation ChangeSets with Amazon Bedrock

Introduction

I created a tool that analyzes CloudFormation ChangeSet content using Amazon Bedrock. The actual code is available here.

Background

I've been using CloudFormation frequently lately, and I'm encountering CloudFormation ChangeSets more often.

Info: What is CloudFormation ChangeSet?
A convenient feature that lets you understand which resources will be updated or deleted before updating the stack

However, with this feature, it's unclear how to understand:

  • What kind of impact will occur
  • Whether there will be user impact
  • What risks are involved

It was tedious to organize these considerations in my head or investigate each time. So I created a tool to analyze ChangeSet content using Bedrock to help reduce this workload.

Tool Overview

The processing is straightforward:

  1. Retrieve the CloudFormation ChangeSet content
  2. Send the content to Bedrock
  3. Analyze from four perspectives and output the results:
    • Runtime behavior
    • User impact
    • Rollback risks
    • Operational considerations

Rather than simply summarizing the ChangeSet, the goal was to output "the kind of things I always think about in my head."

Impressions After Building

Since I didn't have much knowledge about Bedrock, it took time to understand the specifications initially. Once I actually used it, I realized that prompt design was crucial—particularly deciding "how much to delegate to AI."

The actual implementation went smoothly by leveraging AI services like Github Copilot.

Conclusion

If you're someone who looks at a ChangeSet and thinks, "What will happen if I do this? Is it really safe to run?"—this tool might be helpful for you. I'd be happy if you'd try it out. (I'm looking forward to your feedback!)

Top comments (0)