Claude · · 6 min
I Moved My Blog to AWS and Audited Everything on the Way
tl;dr - Set out to audit my homelab. Finished a stalled blog migration too. Locked down AWS before going live. The cutover itself took twelve minutes.
An audit that turned into a migration
I sat down yesterday to audit my homelab. Nothing was on fire. I just wanted the whole picture: what's exposed, what's stale, what I'd built quickly and never circled back to. Partway in, Claude reminded me I still had an AWS MCP server running, a small box I'd built a while back so Claude could manage parts of my AWS account from chat. That reminder knocked loose another one. I'd been meaning to move this blog off managed Ghost hosting and onto my own AWS infrastructure, and I never wrapped it up.
Why move at all? The managed Starter plan doesn't include Ghost's Admin API, and I need it. My daily work notes feed a draft, Claude writes it up, I approve or edit it, and Claude schedules it. That last step needs the API. Here's the math. Starter is $18 a month with no API. The tier with the API is $29. A small Lightsail server is $12, and the API comes with the software.
So the plan changed. Before I let Claude build the blog's new home in my AWS account, that account needed to be clean. The migration and the audit ran together.
Building on what I already knew
I've been in IT for 25+ years, a lot of it as a sysadmin. I've built EC2 instances, written IAM policies, cleaned up security groups, and rotated keys more times than I can count. None of this was new territory, and that mattered. Claude wasn't teaching me AWS. It was working inside an account I understood, using patterns I could read and check.
The new home is AWS Lightsail, Amazon's simpler flat-rate server offering, with Cloudflare in front. I considered hosting it at home and passed. Anything that goes wrong on a box in my house goes wrong inside my house. A small cloud server keeps the blast radius somewhere else.
The design came down to one rule: no public ports. Not 80, not 443, not SSH. Visitors reach the blog through a Cloudflare Tunnel, an outbound connection the server makes to Cloudflare, so there's nothing on the server to knock on. The admin side sits behind Cloudflare Access with a one-time code, and managing the server itself happens over a private network, never the open internet. It's all in Terraform, secrets come out of 1Password at runtime and never land on disk, and there's a nightly backup with a restore drill that actually passed. A backup you've never restored is a hope, not a backup.
The move itself started with a backup. I pulled a full export from the paid platform at 12:50 yesterday afternoon: ten posts, an About page, 13 tags, 54 images, all in one download. The first Terraform run kicked off at 1:05, and by 2:07 Ghost was serving that imported site on a staging address. Export to running copy in about an hour and fifteen minutes.
The audit, in tandem
While the new server came up, Claude audited the AWS account, Cloudflare, and the rest of my setup. It caught the worst problem on the first pass, inside the first hour.
That old AWS MCP server, the one Claude reminded me about, answered tool requests from the open internet with no credential at all. CloudTrail showed no misuse, I locked it down, and then I retired it. The next morning the instance, its role, and its address were deleted for good.
That was the glaring one. The rest was a long tail, the stuff that piles up in any account that's been around a while:
- Two stopped EC2 instances, an unused Elastic IP, and an orphaned network interface.
- A pile of old launch-wizard security groups, one of them open to the world.
- Four EC2 key pairs that didn't match any key I still had.
- A DNS record pointing at an AWS address I'd already released, which is how subdomain takeovers start.
- Daily console sign-in as the root user.
Every AWS item got closed. Not every finding became a fix, though, because an audit is a list of questions, not a list of orders. Claude logged the ones I declined so they don't keep coming back.
What would a consultant have done here? A scoping call, access requests, a discovery period, a findings report, then a quote for remediation. Days at best, with an invoice at the end. Claude found the critical issue in under an hour and had the AWS side fully closed by late morning the next day, fixes included. I'm not saying that replaces a security firm for a company with real compliance needs. For one person's account, it did the legwork I'd have paid someone for, and finished before a consultant would've sent the proposal.
What I learned on top of what I knew
I came in with good habits. I left with a few better ones.
- Stop signing in as root. I had MFA on root and no access keys, which is where most advice stops. Now there's a separate admin user with a passkey, and root stays in the drawer. I've known this for years in companies I've worked for, but at a personal level, I should have known better. 😬
- Block public S3 at the account level. Not bucket by bucket. One setting, and no bucket in the account can go public by accident later.
- Get told when things change. Seven EventBridge rules now email me on root activity, failed console logins, IAM changes, logging changes, new servers, buckets or keys, and any Lightsail or mail change. That includes changes Claude makes.
- Set a budget tripwire. $25 a month, with alerts before it gets there. A leaked key usually shows up on the bill first.
- Turn on IAM Access Analyzer. It flags anything in the account shared outside it. Zero findings is a nice thing to see. A free tool is an easy yes.
- Keep containers away from the metadata service. IMDSv2 is required, and the Ghost containers can't reach it at all, so a compromised container can't walk off with the server's credentials.
One gotcha worth passing on. SNS silently drops messages while an email subscription is still waiting for confirmation, and the confirmation email itself counts as a delivery. A test that says "delivered: 1" right after setup proves nothing. Confirm first, then test.
The cutover
So how long did the actual cutover take?
The first attempt started a little after noon and failed within minutes. The bare domain redirected to a hostname that didn't exist anymore. The culprit was a Cloudflare redirect rule I'd set up back in July for a different blog platform. It only fires on traffic Cloudflare proxies, and that domain hadn't been proxied since, so it sat there invisible for months. Claude had saved the old DNS records before touching anything, so the rollback was quick and boring, which is exactly what a rollback should be.
Second attempt. Back up the rule, delete it, point the domain at the tunnel, send www to the bare domain, update the publishing tools. Then check everything: pages, RSS, sitemap, images, canonical tags, the admin login gate, mail records. Live at 12:17.
Running math: started around 12:05, rolled back once, live at 12:17. Twelve minutes for the cutover, failure included. End to end, from the backup on the paid platform at 12:50 yesterday to production at 12:17 today, was just under 24 hours on the clock. A good chunk of that was me asleep.
The lesson: before you proxy a hostname that used to be DNS-only, check every zone-level rule. Redirects, access apps, page rules. Old rules don't expire just because you forgot about them.
Guardrails, not a blank check
Giving an AI agent access to your AWS account sounds like the start of a bad story. Here's how it actually worked.
- Scoped identities. Claude worked through separate IAM users, each scoped to one job. The read-only audit permissions came off when the audit was done.
- Secrets stayed secret. Everything ran through 1Password. Claude used credentials without ever printing them.
- I held the dangerous keys. Root console, admin rights on my own machines, and anything destructive needed me. Claude staged the script, I ran it.
- Rollback before change. Every DNS change had a saved copy of the old records first. That's why attempt one was a non-event.
- Draft only. The new publishing tools can create drafts and schedule a post I've approved. They can't publish on the spot and they can't send a newsletter.
- Watched like anyone else. The change alerts don't care who made the change. If Claude touches IAM, I get the email.
Claude did the legwork, I kept the decisions. It's how I'd set up a strong new admin on my team. Empower somebody to take everything off your plate, but don't hand them the root password on day one.
Where it stands
This blog now runs on a server I control, with no open ports, nightly backups, and the Admin API that started the whole thing. The AWS account is cleaner than it's been in years. A full re-audit is next. The managed plan gets canceled after a short overlap.
I sat down to audit a homelab. I came out with a migrated blog, a locked-down cloud account, and a few habits I should've picked up years ago.