AWS Builder Center
Secure Your New AWS Account in 30 Minutes (Before You Build Anything)

Secure Your New AWS Account in 30 Minutes (Before You Build Anything)

A practical, beginner-friendly checklist to lock down a fresh AWS account: root protection, passkeys, IAM Identity Center, CloudTrail, GuardDuty, and cost guardrails. It’s the foundation you need before running workloads or letting AI agents touch your cloud.

Most cloud breaches don't start with a Hollywood-style hack. They start with a leaked access key, a root account with no MFA, or a public bucket nobody noticed.
The good news: you can close most of these gaps in about 30 minutes. Do this before you launch your first EC2 instance, Lambda, or AI agent.

1. Lock down the root user

The root user can do everything, including closing the account. Treat it like a emergency key.
  • Enable MFA on root, preferably a passkey or hardware security key.
  • Remove any root access keys. You should never need them.
  • Use a shared mailbox or alias for the root email, not a personal inbox.
  • Store the recovery details somewhere safe, then stop using root for daily work.

2. Use IAM Identity Center, not IAM users

Long-lived IAM user credentials are a classic leak. IAM Identity Center gives you short-lived credentials and central access management.
  1. Enable IAM Identity Center in your home Region.
  1. Create a user for yourself and assign an admin permission set.
  1. Sign in through the access portal and use temporary credentials in the CLI:
aws configure sso
aws sso login --profile my-admin
aws sts get-caller-identity --profile my-admin
Rule of thumb: no static access keys unless there's no alternative.

3. Turn on CloudTrail

If something goes wrong, logs are how you find out what happened.
  • Create a multi-Region trail that delivers to a dedicated S3 bucket.
  • Enable log file validation.
  • Restrict who can modify or delete that bucket.
Event History alone only covers 90 days of management events, so a trail is what gives you long-term evidence.

4. Enable GuardDuty

GuardDuty monitors for suspicious activity such as unusual API calls, crypto-mining behavior, and compromised credentials. Enable it in every Region you use (or all Regions if you're unsure) and review the findings regularly.

5. Block public access and check what's exposed

  • Keep S3 Block Public Access on at the account level.
  • Turn on IAM Access Analyzer to flag resources shared outside your account.
  • Check security groups regularly. Avoid  0.0.0.0/0  on SSH (22) and RDP (3389).

6. Set cost guardrails

A compromised account often shows up first as a surprising bill.
  • Create an AWS Budget with email alerts at 50%, 80%, and 100%.
  • Enable Cost Anomaly Detection.

7. Apply least privilege from day one

Start with narrow permissions and expand only when needed. Use IAM Access Analyzer's policy generation to build policies from real CloudTrail activity instead of guessing.
This matters even more now that teams are connecting AI agents and automation to cloud accounts. Give agents scoped, temporary, auditable roles, never admin by default.

Quick checklist

Done
Task
☐
Root MFA enabled, no root keys
☐
IAM Identity Center set up
☐
Multi-Region CloudTrail logging
☐
GuardDuty enabled
☐
S3 Block Public Access + Access Analyzer
☐
Budgets + Cost Anomaly Detection
☐
Least-privilege roles for people and automation

Final thoughts

Security isn't a feature you bolt on later. It's the foundation that lets you build fast without worrying about what's lurking underneath. Do these seven things once, and every project you build afterward starts on solid ground.
What's the first thing you configure in a new AWS account? Share it in the comments.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article