List of Credit "Killers" to Avoid

Tier 1: Extremely Dangerous (Can drain $200 in hours)

Amazon SageMaker

  • Training Jobs: $1-10/hour per instance
  • Notebook Instances: $0.0464-4.32/hour
  • Endpoints: $0.048-4.32/hour
  • Warning: Easy to forget to turn off, auto-scaling

GPU Instances (EC2)

  • p3.2xlarge: $3.06/hour
  • p4d.24xlarge: $32.77/hour
  • g4dn.xlarge: $0.526/hour
  • Warning: Very expensive, no Free Tier

Amazon Redshift

  • dc2.large: $0.25/hour
  • ra3.xlplus: $3.26/hour
  • Warning: Minimum cluster size, hard to optimize

Defense Strategy

1. Set up Billing Alerts

  • Access Billing and cost management Set-up
  • Select Budgets tab
  • Click Create Budgets Set-up
  • Select Customize
  • Select Cost budget
  • Click Next Set-up
  • Enter Budget name: My-200$-budget
  • Period: Monthly
  • Select Recurring budget
  • Budgeting method: Fixed
  • Budget amount: 200.00 Set-up
  • Select All AWS Services
  • Select Unblended costs
  • Click Next Set-up
  • Click Add alert threshold
  • Enter and create 4 alerts sequentially: 12.5, 25, 50, 75
  • Enter Email recipients for each alert Set-up Set-up Set-up Set-up
  • Check if all alerts have been created completely Set-up
  • Click Next Set-up
  • Review and click Create Budget Set-up
  • Congratulations, you have successfully created a Budget to continue using AWS "safely"

2. Daily Cost Monitoring

  • Check Cost Explorer daily
  • Review “Daily Spend” and “Service Breakdown”
  • Set up Cost Anomaly Detection

3. Automated Cleanup Script

#!/bin/bash
# Automated cleanup script (run daily)

# Stop all running EC2 instances tagged for shutdown
aws ec2 describe-instances --filters "Name=tag:AutoShutdown,Values=yes" \
  --query ''Reservations[].Instances[?State.Name==``running``].InstanceId'' \
  --output text | xargs -r aws ec2 stop-instances --instance-ids

# Delete unattached EBS volumes older than 7 days
aws ec2 describe-volumes --filters "Name=status,Values=available" \
  --query ''Volumes[?CreateTime<=``2024-01-01``].VolumeId'' \
  --output text | xargs -r aws ec2 delete-volume --volume-id

Safe Services for Free Tier

Always Safe (generous Free Tier)

  • Lambda: 1M requests/month free
  • DynamoDB: 25GB storage + 25 RCU/WCU free
  • S3: 5GB storage + 20,000 GET requests free
  • CloudWatch: 10 metrics + 1M API requests free
  • SNS: 1M publishes free
  • SES: 62,000 emails free

Safe with Caution

  • EC2: t2.micro/t3.micro only
  • RDS: db.t3.micro only
  • ElastiCache: cache.t3.micro only
  • API Gateway: Monitor request count