Amazon Q Developer CLI Helped Me Clone EC2 in One Prompt — No Console, No YAML
Streamlining Developer Workflows with Amazon Q Developer CLI: Simplifying EC2 Management
Hello Devs,
you might have heard about the recent release of Amazon Q Developer CLI.
I heard about it too, but like most tools, it sat on my radar until the moment I truly needed it - a real-time use case that made me glad I gave it a shot.
It started with a small request... and a potential disaster.
One of our developers was testing a machine learning model on an EC2 instance. A regular dev task, nothing fancy.
But a few hours in, he messaged me:
“Something’s off with the setup. I don’t want to break anything — can I get a clone of this machine to test on?”
Fair ask. But the instance he was using was one we also used for other internal dev workflows. Any changes could have unintended consequences.
My default plan? Console clicks and lots of waiting.
Cloning an EC2 isn’t rocket science — but it’s tedious:
Open AWS Console
Go to EC2
Find the instance
Create an AMI
Wait for the AMI to become available
Launch a new instance from it
Manually select the same instance type, security groups, IAM role...
Hope nothing breaks during this dance
It’s not hard, but I’ve done it too many times to count — and it always eats up 15–20 minutes, minimum.
This time, I tried something different. Amazon Q Developer CLI.
I had recently installed Amazon Q Developer CLI after reading about it.
A command-line assistant that understands natural language prompts and turns them into real AWS commands? I had to try it.
So instead of diving into the Console, I opened my terminal:
q chat
And typed:
“Create a new EC2 instance from the existing one named
ml-base-server
. Use the same security group and IAM role.”
That’s it. One sentence. No flags. No resource IDs.
What happened next blew me away.
Amazon Q Developer CLI:
Identified the instance from its Name tag (
ml-base-server
)Generated an AMI creation command
Waited for the AMI to become available
Created a new EC2 instance using:
The same instance type
The same security group(s)
The same IAM role
Even prompted me to confirm each step before executing
No scrolling. No searching. Just… done.
The result? My dev got a clean copy. Our base setup stayed untouched.
He could now run experiments safely.
No stress, no last-minute surprises, no Console hopping.
What would have taken 15+ minutes manually was done in under 3 — right from my terminal.
Why this matters
We often think of DevOps automation in terms of scripting or building pipelines.
But sometimes, what you really want is a conversation.
That’s what Amazon Q Developer CLI gives you:
You say what you want in plain English
It figures out how to do it
You still keep control with confirmations
For small-but-important infra tasks like this, it’s a game-changer.
Try it yourself
If you haven’t used Amazon Q Developer CLI yet, get started here:
👉 Getting Started with Amazon Q Developer CLI – dev.to
Once installed, try this prompt:
q chat
“Create a new EC2 instance from the one named
your-instance-name
. Keep the same security group and IAM role.”
⚠️ Heads Up: A Few Post-Install Steps Are Missing from the Docs (macOS)
If you’re following the official Amazon Q CLI installation guide, you’ll notice it stops right after:
brew install amazon-q
q --version
But if you're on macOS, there are a few extra steps you must follow before things actually start working:
✅ Steps You Need to Complete After Installing via Brew
Open the Amazon Q desktop app
After thebrew install
, you’ll find a new app called Amazon Q installed on your system (via Launchpad or Spotlight).Grant Accessibility Permissions
When you launch the app for the first time, it will prompt you to enable accessibility access.
Go to:
System Settings → Privacy & Security → Accessibility
Then allow Amazon Q (CodeWhisperer) to control your system.
Login to AWS from the app
You’ll be prompted to authenticate with your AWS account.Enable Terminal Integration
Go to the Integrations tab in the sidebar, and click “Enable” for your preferred terminal:Terminal.app
iTerm2
Hyper
VS Code Terminal
Verify it’s active
Open your terminal and try typingq chat
— you should now see the CLI assistant activate in context.
Final Thoughts
Feel free to share what you are targeting to move from manual or script work to Amazon Q Developer CLI I’ve built EC2 clones hundreds of times the old way.
But this experience — using natural language to handle it — felt like the future.
Amazon Q Developer CLI didn’t just save time.
It let me focus on solving the actual problem, not navigating a UI maze.
And honestly?
I can’t wait to see what other repetitive tasks I can retire next.