DEV Community

Yash Sonawane
Yash Sonawane

Posted on

Top 10 AWS Security Mistakes Newbies Make (and How to Fix Them) ๐Ÿ”’๐Ÿ˜ฑ

"I only exposed one S3 bucket for testing... what could go wrong?" ๐Ÿ˜ฌ

Security on AWS isnโ€™t just for enterprise cloud architects โ€” itโ€™s critical for everyone, especially beginners. Because one innocent misstep could leave your app, data, or entire AWS account vulnerable to the world.

In this post, weโ€™ll break down the 10 most common security mistakes new AWS users make, how to fix them, and what to do instead โ€” in simple, beginner-friendly terms.

Letโ€™s lock it down. ๐Ÿ”


1๏ธโƒฃ Using the Root Account for Everything

โŒ The Mistake:

Using your AWS root user (the one you created during signup) to launch EC2s, manage IAM, or deploy services.

โœ… The Fix:

  • Create an admin IAM user with necessary permissions
  • Enable MFA on the root account
  • Use the root only for billing or account-level setup

Root is like the master key to your kingdom โ€” donโ€™t use it to open every door.


2๏ธโƒฃ Leaving S3 Buckets Public by Default

โŒ The Mistake:

You create a bucket for image uploads and forget to lock it down โ€” boom, public exposure.

โœ… The Fix:

  • Set bucket policy to deny public access by default
  • Enable S3 Block Public Access
  • Use pre-signed URLs if public file access is needed
aws s3api put-bucket-policy --bucket mybucket --policy file://secure-policy.json
Enter fullscreen mode Exit fullscreen mode

3๏ธโƒฃ Ignoring IAM Best Practices

โŒ The Mistake:

Giving everyone AdministratorAccess โ€” because it's easier than fine-tuning permissions.

โœ… The Fix:

  • Use least privilege principle
  • Assign only necessary policies to users, roles, or groups
  • Use IAM Roles for services like EC2 or Lambda

Real-world tip: Use IAM Access Analyzer to spot overly permissive policies.


4๏ธโƒฃ Not Enabling MFA (Multi-Factor Authentication)

โŒ The Mistake:

Logging in with just email/password โ€” no second layer of security.

โœ… The Fix:

  • Enable MFA for all IAM users and root account
  • Use virtual MFA apps like Google Authenticator or Authy

5๏ธโƒฃ Hardcoding AWS Keys in Code Repositories

โŒ The Mistake:

Adding your AWS access/secret keys directly into code or pushing them to GitHub ๐Ÿ˜ฑ

โœ… The Fix:

  • Use IAM Roles when running on AWS (EC2, Lambda)
  • Use AWS CLI profiles for local dev
  • Store secrets in AWS Secrets Manager or SSM Parameter Store

6๏ธโƒฃ Skipping Logging and Monitoring

โŒ The Mistake:

Not enabling CloudTrail or CloudWatch Logs โ€” so you have no idea who did what.

โœ… The Fix:

  • Turn on CloudTrail globally
  • Enable logging for S3, Lambda, API Gateway
  • Use Amazon GuardDuty for threat detection

7๏ธโƒฃ Opening All Ports in Security Groups

โŒ The Mistake:

Allowing inbound traffic from 0.0.0.0/0 to all ports in EC2 or RDS Security Groups.

โœ… The Fix:

  • Only open necessary ports (e.g., 22 for SSH, 80 for HTTP)
  • Restrict IPs to your trusted sources
  • Use bastion hosts or VPNs for internal access

8๏ธโƒฃ Not Using Encryption

โŒ The Mistake:

Storing sensitive data in plain text in RDS, S3, or EBS.

โœ… The Fix:

  • Enable SSE (Server-Side Encryption) for S3
  • Use encryption at rest for RDS, EBS, and EFS
  • Encrypt in-transit using HTTPS and SSL/TLS

9๏ธโƒฃ Forgetting to Set Budgets or Alerts

โŒ The Mistake:

A forgotten EC2 or RDS instance quietly burns through your Free Tier... and your wallet.

โœ… The Fix:

  • Set up AWS Budgets and cost alerts
  • Enable billing alarms in CloudWatch

Pro tip: Use AWS Cost Explorer to track and optimize your usage.


๐Ÿ”Ÿ Not Deleting Unused Resources or Credentials

โŒ The Mistake:

Leaving old IAM users, access keys, test EC2s, or Lambda triggers lying around.

โœ… The Fix:

  • Regularly audit and clean up unused IAM users, keys, and roles
  • Tag and track resources for easier cleanup
  • Use AWS Trusted Advisor for security recommendations

๐Ÿ” TL;DR โ€“ Quick Fixes Cheatsheet

Mistake Fix
Root Account Everywhere Create Admin IAM user + MFA
Public S3 Block public access + pre-signed URLs
Admin Access for All Use least privilege IAM policies
No MFA Enable for root + IAM users
Keys in Code Use roles + Secrets Manager
No Logs Enable CloudTrail + GuardDuty
Open Ports Restrict Security Groups
No Encryption Use SSE and HTTPS everywhere
Surprise Billing Set Budgets + Alarms
Cloud Junk Regular cleanup + tagging

๐Ÿ™Œ Letโ€™s Stay Secure โ€” Together

Cloud is powerful, but power without protection is risky. Make security a habit from Day 1.

๐Ÿ‘‡ Whatโ€™s a security mistake YOU made (or saved someone from)? Got a tip to add?

Drop it in the comments, smash โค๏ธ if this helped you or your team, and share it with someone just starting out in the cloud.

Stay safe, stay smart โ€” and keep building. ๐Ÿงก

Top comments (0)