• DevOps
    Case Study

    How we helped a development company rebuild DevOps for efficiency and scale.

    READ CASESTUDY
    icon

    24/7 DevOps as a Service

    Round-the-clock DevOps for uninterrupted efficiency.

    icon

    Infrastructure as a Code

    Crafting infrastructure with ingenious code.

    icon

    CI/CD Pipeline

    Automated CI/CD pipeline for seamless deployments.

    icon

    DevSecOps

    Integrated security in continuous DevOps practices.

    icon

    Hire DevOps Engineers

    Level up your team with DevOps visionaries.

    icon

    Consulting Services

    Navigate success with expert DevOps consulting.

  • TechOps
    Case Study

    How a US hosting leader scaled with us!

    READ CASESTUDY

    WEB HOSTING SUPPORT

    icon

    HelpDesk Support

    Highly skilled 24/7 HelpDesk Support

    icon

    Product Support

    Boost your product support with our expertise.

    MANAGED SERVICES

    icon

    Server Management

    Don’t let server issues slow you down. Let us manage them for you.

    icon

    Server Monitoring

    Safeguard your server health with our comprehensive monitoring solutions.

    STAFF AUGMENTATION

    icon

    Hire an Admin

    Transform your business operations with our expert administrative support.

    icon

    Hire a Team

    Augment your workforce with highly skilled professionals from our diverse talent pool.

  • CloudOps
    Case Study

    How we helped a Private Deemed University in India, save US $3500/m on hosting charges!

    READ CASESTUDY
    icon

    AWS Well Architected Review

    Round-the-clock for uninterrupted efficiency

    icon

    Optimize

    Efficient CloudOps mastery for seamless cloud management

    icon

    Manage

    Automated CI/CD pipeline for seamless deployments

    icon

    Migrate

    Upgrade the journey, Migrate & Modernize seamlessly

    icon

    Modernize

    Simplify compliance complexities with our dedicated services

    icon

    FinOps as a Service

    FinOps as a Service

  • SecOps
    Case Study

    Enabling financial grade platforms through strategic cloud modernisation.

    READ CASESTUDY
    icon

    VAPT

    Vulnerability Assessment and Penetration Testing

    icon

    Source Code Review

    Ensuring source code security ans safe practices to reduce risks

    icon

    Security Consultation

    On demand services for improving server security

    icon

    System Hardening

    Reduced vulnerability and proactive protection

    icon

    Managed SoC

    Monitors and maintains system security. Quick response on incidents.

    icon

    Compliance as a Service

    Regulatory compliance, reduced risk

  • Insights
    Case Study

    How we helped a Private Deemed University in India, save US $3,500/m on hosting charges!

    READ CASESTUDY
    icon

    Blog

    Explore our latest articles and insights

    icon

    Case Studies

    Read about our client success stories

    icon

    Flipbook

    Explore our latest Flipbook

    icon

    Events

    Join us at upcoming events and conferences

    icon

    Webinars

    Watch our educational webinar series

  • Our Story
  • Contact Us

Interested to collaborate?

Get in touch with us!

Contact us today to learn how our team can help you leverage our managed cloud and DevOps services so you can focus on growing your business.

White Label Technical Support Services

  • White Label Managed IT Services for MSPs
  • White Label MSP Support Services
  • Managed HelpDesk Services
  • White Label WordPress Maintenance Services
  • Outsourced WebHosting Support
  • Hosting HelpDesk Support Services
  • cPanel Server Management
  • Plesk Server Management

Managed DevOps Services

  • DevOps Automation Services
  • DevOps Containerization Services
  • DevOps Engineering Services Experts
  • DevOps Maturity Assessment
  • DevOps Testing Services & Automation
  • DevOps Implementation Services
  • DevOps Transformation Services

Cloud Native Consulting

  • White Label Kubernetes IT Services
  • Cloud Automation Services
  • Cloud Modernization Services
  • Database Migration Services
  • DevOps Outsourcing Services

The Big 3 Managed Cloud Services

AWS

  • AWS DevOps Services for Scalable Cloud
  • AWS Well-Architected Review
  • AWS Migration Services

Azure

  • Azure DevOps Services & Automation
  • Azure Migration Services

Google Cloud

  • Google Cloud Managed Services
  • Google Cloud Migration Services
  • Google Cloud Platform Services

Our Key Cloud Partners

  • AWSAWS
  • Azure CloudAzure Cloud
  • Google CloudGoogle Cloud
  • Akamai CloudAkamai Cloud
  • OVHOVH
  • Digital OceanDigital Ocean
  • HetznerHetzner

Managed Cloud Services

  • Managed DigitalOcean Cloud
  • Managed OVH Cloud
  • Managed Hetzner Cloud
  • Managed Akamai Cloud
  • Oracle Managed Services

About Us

  • Our story
  • Life@SupportSages
  • Insights
  • Careers
  • Events
  • Contact Us
  • Sitemap

aws partneraws advanced partner
LinkedInFacebookXInstagramYouTube
SupportSages

Copyright © 2008 – 2026 SupportSages Pvt Ltd. All Rights Reserved.
Privacy PolicyLegal TermsData ProtectionCookie Policy

Cloud Security: The Sage’s Hardening Handbook (AWS Edition)

Author Profile
Sarah
  • 5 min read
Cloud Security: The Sage’s Hardening Handbook (AWS Edition)

Generating audio, please wait...

In modern cloud environments, security is not a one-time setup—it’s a continuous process. Misconfigured IAM roles, unencrypted storage, or overly permissive network rules can expose critical infrastructure.

This guide expands on a practical AWS security hardening checklist, transforming it into a deep-dive troubleshooting and implementation blog. You can use this as a reference alongside your internal notebooks or automation tools.

1. Exposed View (Finding Excess Permissions)

Why it matters

Over-permissioned IAM roles are one of the top causes of cloud breaches. The principle of least privilege ensures users/services only have the access they need.

Key Checks

Identify public S3 buckets with public access.

The below command will show the public access configuration of each bucket in your AWS account.

for bucket in $(aws s3api list-buckets --query "Buckets[].Name" --output text); do
  echo "Checking: $bucket"
  aws s3api get-public-access-block --bucket "$bucket" \
    --query "PublicAccessBlockConfiguration" \
    --output json 2>/dev/null
done

What to look for

If any of these are false, bucket may be public:

  • BlockPublicAcls
  • IgnorePublicAcls
  • BlockPublicPolicy
  • RestrictPublicBuckets

If you need a tabular view run the below command in the terminal and wait for a minute. This command is actually checking the bucket policy, bucket ACL and public access block(PAB) configuration and deciding whether S3 bucket is open to the public or blocked. 

printf "%-30s %-10s %-10s %-10s\n" "BUCKET" "POLICY" "ACL" "PAB"

for bucket in $(aws s3api list-buckets --query "Buckets[].Name" --output text); do

  # Check Policy
  policy=$(aws s3api get-bucket-policy --bucket "$bucket" --query Policy --output text 2>/dev/null | grep -q '"Principal": "*"' && echo "PUBLIC" || echo "PRIVATE")

  # Check ACL
  acl=$(aws s3api get-bucket-acl --bucket "$bucket" --query "Grants[].Grantee.URI" --output text 2>/dev/null | grep -Eq "AllUsers|AuthenticatedUsers" && echo "PUBLIC" || echo "PRIVATE")

  # Check Public Access Block
  pab=$(aws s3api get-public-access-block --bucket "$bucket" --query "PublicAccessBlockConfiguration.BlockPublicPolicy" --output text 2>/dev/null)
  pab_status=$([ "$pab" == "True" ] && echo "BLOCKED" || echo "OPEN")

  printf "%-30s %-10s %-10s %-10s\n" "$bucket" "$policy" "$acl" "$pab_status"

done

Result:

 List IAM users with Console access but no MFA

aws iam generate-credential-report && sleep 5 && \
aws iam get-credential-report --query 'Content' --output text | \
base64 --decode | \
awk -F',' 'NR>1 && $4=="true" && $8=="false" {print $1, "| Password: "$4, "| MFA: "$8}'

Detect access key usage

printf "%-20s %-22s %-25s %-10s\n" "USERNAME" "ACCESS_KEY_ID" "LAST_USED" "DAYS_UNUSED"

THRESHOLD=30
NOW=$(date +%s)

for user in $(aws iam list-users --query "Users[].UserName" --output text); do
  for key in $(aws iam list-access-keys --user-name "$user" --query "AccessKeyMetadata[].AccessKeyId" --output text); do

    last_used=$(aws iam get-access-key-last-used \
      --access-key-id "$key" \
      --query "AccessKeyLastUsed.LastUsedDate" \
      --output text)

    if [ "$last_used" == "None" ]; then
      days_unused="NEVER"
      flag=1
    else
      last_used_epoch=$(date -d "$last_used" +%s 2>/dev/null)
      days_unused=$(( (NOW - last_used_epoch) / 86400 ))

      if [ $days_unused -gt $THRESHOLD ]; then
        flag=1
      else
        flag=0
      fi
    fi

    if [ "$flag" == "1" ]; then
      printf "%-20s %-22s %-25s %-10s\n" "$user" "$key" "$last_used" "$days_unused"
    fi

  done
done

Troubleshooting Tips

  • If a user has AdministratorAccess, review if it’s really needed.
  • Rotate access keys older than 90 days and remove inactive keys.

Replace IAM users with IAM roles wherever possible.

2. Network Defense (Restricting Exposure)

Why it matters

Security groups are your first line of defense. Misconfigured rules can expose your infrastructure to the internet.

Key Checks

Identify overly permissive rules

Look for:

Especially on ports:

  • 22 (SSH)
  • 3389 (RDP)
aws ec2 describe-security-groups --query "SecurityGroups[?IpPermissions[? (ToPort==\`22\` ||
ToPort==\`3389\`) && IpRanges[?CidrIp=='0.0.0.0/0'] ]].{ID:GroupId,Name:GroupName}" --output table

Troubleshooting Tips

  • Replace 0.0.0.0/0 with:
    • Office IP
    • VPN CIDR
  • Use bastion hosts instead of direct SSH access

Implement AWS WAF for public apps.

Promotional banner

3. Incident Response (Detecting Compromised Roles)

Why it matters

If an IAM role is compromised, attackers can move laterally quickly.

Key Checks

Immediately revote active sessions

aws iam put-role-policy --role-name <ROLE_NAME> --policy-name DenyAll --policy-document file://deny-all.json

deny-all.json

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Deny",
      "Action": "*",
      "Resource": "*"
    }
  ]
}

Unencrypted storage can lead to data leaks and compliance violations.

Key Checks

Check EBS encryption

Command to check whether EBS encryption is enabled by default in the account/region

aws ec2 get-ebs-encryption-by-default

Command to list unencrypted volumes:

aws ec2 describe-volumes \
  --query "Volumes[?Encrypted==\`false\`].[
    VolumeId,
    Size,
    State,
    Attachments[0].InstanceId
  ]" \
  --output text | while read vol size state instance; do

    name=$(aws ec2 describe-instances \
      --instance-ids $instance \
      --query "Reservations[].Instances[].Tags[?Key=='Name'].Value" \
      --output text 2>/dev/null)

    echo "$vol,$size,$state,$instance,$name"

done

Verify if your RDS instane have storage encrypted

aws rds describe-db-instances --query 'DBInstances[*].[DBInstanceIdentifier,StorageEncrypted]'

rds-encrption-check.png

5. Log Analysis (Detecting Suspicious Activity)

Why it matters

Logs are your only source of truth during incidents.

Key Checks

Query CloudTrail logs

aws cloudtrail lookup-events \
  --lookup-attributes AttributeKey=ReadOnly,AttributeValue="false" \
  --query "Events[?ErrorCode=='AccessDenied'].{User:Username,Time:EventTime,Event:EventName}" \
  --output table

Cloud security is a shared responsibility, and small misconfigurations can have large impacts. By continuously auditing IAM, network, encryption, and logs, you can significantly reduce your attack surface.

  • DevOps
  • AWS

Continue Your Journey With…

AWS Well Architectured Framework Review

AWS Well Architectured Framework Review

SupportSages, your AWS Advanced Tier Services partner, We guide you on the journey to architectural excellence through our AWS Well-Architected Framework Review

Security Consultation

Security Consultation

In today's dynamic digital landscape, our professional security consultation services help optimize your business by strengthening defenses and identifying vulnerabilities.

Promotional banner
Promotional banner

AWS Architect's Map: Decision and Governance

AWS Architect's Map: Decision and Governance
  • AWS
  • Security
logo

Benefits of DevOps as a Service: What Your Business Actually Gains

Benefits of DevOps as a Service: What Your Business Actually Gains
  • DevOps
  • Security
logo

DevOps as a Service Pricing: What Factors Determine What You Pay

DevOps as a Service Pricing: What Factors Determine What You Pay
  • DevOps
  • Kubernetes
  • AWS
  • Azure
logo

Docker Mastery: The Sage's Image, Volume Cleanup

Docker Mastery: The Sage's Image, Volume Cleanup
  • Docker
logo

Posts by Sarah

    Cloud Security: The Sage’s Hardening Handbook (AWS Edition)