Urgent.News

What's breaking now, across thousands of outlets.

Tech

Why is my AWS bill so high when traffic is flat?

An AWS bill that climbs while traffic stays flat usually has one of three causes: data nobody deletes keeps piling up, a discount has ended, or a new charge started on a set date. To see why your AWS bill is so high, compare the month before the climb with the latest one in Cost Explorer. Compare two months in Cost Explorer Open the free Compare view under Report parameters, pick two of the last…

An AWS bill that continues to increase even when web traffic remains constant can be attributed to several factors. These include unremoved data accumulating over time, a discount expiring, or new charges commencing on a specific date. To determine the cause of a high AWS bill, compare the costs of the most recent month with those of the previous month using AWS Cost Explorer.

By accessing the "Compare" view in the report parameters, select two of the last 13 months and group the data by service. The cost comparison tool will display the three most significant changes and identify whether they are due to increased usage, discounts, or other charges and credits.

If the traffic remains flat, a sudden spike in the AWS bill is likely due to an expiration of a savings plan or reservation, or the depletion of credits. To pinpoint the service experiencing growth, filter the data in Cost Explorer by the service and group it by usage type. A gradual increase in costs typically does not trigger any alerts.

The default settings for AWS Cost Anomaly Detection only flag anomalies that exceed both 40% of the expected spend and $100. To receive alerts sooner, configure a budget with a lower threshold. For detailed instructions on setting up budget alerts, refer to the AWS blog post on this topic.

S3 (Simple Storage Service) is another potential source of unexpected AWS charges. When versioning is enabled on an S3 bucket, every version of a file is stored as a separate object at the standard rate. Deleting a file does not free up space, as S3 only adds a delete marker. Additionally, incomplete multipart uploads contribute to the bill until they are either completed or aborted.

S3 Storage Lens offers two free metrics, Noncurrent version bytes and Incomplete multipart upload bytes, which can help identify these issues.

ECR (Elastic Container Registry), a container image registry, can also accumulate costs if every deployment pushes a new image. Implementing a lifecycle policy to remove old images based on count or age can help manage ECR costs. Regularly review and clean up old RDS (Relational Database Service) snapshots, as storage autoscaling on RDS only increases the size without shrinking it after data deletion.

CloudWatch logs, by default, never expire, so it is essential to review and manage these logs, as well as any EBS (Elastic Block Store) snapshots left behind by outdated scripts.

To prevent excessive AWS costs, schedule a monthly review after receiving the invoice, comparing the current month's spend with the spend from six months earlier. Utilize AWS Cost Explorer's "Compare" feature to identify the three biggest changes and their respective reasons. Additionally, examine S3 Storage Lens metrics and apply a lifecycle rule to the S3 bucket to automatically delete noncurrent versions after 30 days and abort incomplete multipart uploads after 7 days.

Remember that deleted versions cannot be recovered, so adjusting the NoncurrentDays setting may be necessary. Lastly, be aware of the end of Savings Plans or reservations, as these do not automatically renew. Before a Savings Plan expires, consider renewing it or queuing a new plan. Lastly, be mindful of the increased costs associated with RDS Extended Support for certain database versions and Multi-AZ standbys.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Put yourself in a viral clip with one photo — no prompt

I shipped Genjutsu AI — a small web tool for a narrow job: take a video people already share, swap the people for photos you pick, and keep the original take. No prompt. No storyboard.

  • Genjutsu AI swaps faces in videos without prompts
  • Users upload clips, select templates, attach photos
  • Final product is 720p video with original audio

GitHub Actions unexpected symbol in a ${{ }} expression

GitHub Actions unexpected symbol in a ${{ }} expression means the expression parser reached a character it has no rule for and stopped.

  • ${{ }} expression causes unexpected symbol error in GitHub Actions
  • YAML file is correct, workflow fails to start due to parse issue
  • Error message provides file name, line/column, problem type, and offending token

How to Catch Missing .env Variables and .env.example Drift Before Production Deploy

Originally published at umutgungorr.com . How to stop silent .env vs .env.example configuration drift and undocumented os.getenv calls in CI before a missing environment variable breaks production.

  • Implement three-step CI pipeline to catch configuration drift
  • Use envdoctor-cli to compare .env and .env.example, fail builds on discrepancies
  • Audit source code for undocumented environment variable lookups with Python AST analysis

More from Sunday 15 November →