Sub topic 8
Sustainability: Reducing the Environmental Impact of Workloads
This chapter assumes you know core AWS services (EC2, S3, IAM, VPC), understand the shared responsibility model from the earlier chapter, and have seen how a multi-tier application is deployed. It covers the Sustainability pillar: its goal, its design principles, the practices behind them, and the mistakes teams make when applying them.
What the Sustainability pillar is
The Sustainability pillar is the part of the Well-Architected Framework that focuses on the environmental impact of running a workload. Its goal is to reduce the energy consumed and the resources required to deliver the same business outcome. It is the newest of the six pillars, added after the original five.
The pillar rests on a version of the shared responsibility model. AWS is responsible for the sustainability of the cloud: efficient data centers, power sourcing, cooling, and hardware lifecycle. You are responsible for sustainability in the cloud: how much compute, storage, and network your workload uses, and how well it uses them.
Because you do not control the data center, your levers are workload design choices. Most of them lower the number of resources you provision, and that also tends to lower your bill.
Design principles
The pillar names a set of design principles. Each one translates into concrete decisions.
- Understand your impact. Measure the workload's footprint and pick a business metric to compare it against, such as emissions per transaction or per active user. Without a ratio, growth hides efficiency gains.
- Establish sustainability goals. Set long-term targets for each workload, such as a target reduction in resources per unit of work, and model the investment needed to reach them.
- Maximize utilization. Right-size workloads and aim for high utilization on the resources you do run. An idle server still draws a large share of its peak power.
- Anticipate and adopt new, more efficient hardware and software offerings. Newer instance generations and managed services often deliver more work per watt.
- Use managed services. Shared services spread the cost of efficient infrastructure across many customers and let AWS keep utilization high.
- Reduce the downstream impact of your cloud workloads. Lower the energy and resources your customers need to use your service, for example by sending smaller payloads so that client devices do less work.
How the principles map to practice
The pillar's best practices fall into several areas. The table shows each area and a typical action.
| Area | What to ask | Typical action |
|---|---|---|
| Region selection | Where does the workload run? | Choose Regions with lower-carbon energy that still meet latency, data residency, and cost needs |
| User behavior patterns | When and how do users interact? | Scale to demand; do not provision for peak around the clock |
| Software and architecture | Does the code do unnecessary work? | Remove unused components, reduce idle processing, and use efficient algorithms |
| Data patterns | How long is data kept, and in which tier? | Set lifecycle rules, delete what you no longer need, and use cheaper tiers for cold data |
| Hardware patterns | Does the hardware match the job? | Right-size instances and use more efficient processor families |
| Development and deployment | Do pipelines waste resources? | Use shared, short-lived build environments and avoid always-on test fleets |
Region selection
Region choice is one of the highest-leverage decisions because it affects the carbon intensity of the electricity behind your workload. It is also one of the hardest to change later, since moving data and services is costly.
Treat region choice as a constrained decision. Latency to users, legal data residency requirements, available services, and price all come first. Among the Regions that satisfy those constraints, prefer one with a lower-carbon energy mix. For batch jobs that can run anywhere, the choice is freer than for a customer-facing API.
User behavior patterns
Provisioning for peak load around the clock wastes resources. Align capacity with actual demand using scaling policies and scheduled actions. Dev and test environments are common offenders, since they often sit idle every night and weekend.
The following command lists the Auto Scaling groups in a Region and shows their size settings. Run it to find groups whose minimum capacity is high compared with their real load.
aws autoscaling describe-auto-scaling-groups \
--query "AutoScalingGroups[].{Name:AutoScalingGroupName,Min:MinSize,Max:MaxSize,Desired:DesiredCapacity}" \
--output tableSoftware and architecture
Efficient code does less work for the same result. Look for polling loops that could be event-driven, synchronous jobs that could be batched, and services that run when nothing is happening. Serverless and event-driven designs help here because compute runs only while there is work to do. They are not automatically better. A function invoked millions of times for trivial work can use more resources than one batch job.
Data patterns
Storage has a footprint too. Every replicated, retained, or backed-up copy requires hardware. Set a retention policy for each data set, and move data to colder tiers as it ages.
This lifecycle configuration moves objects to an infrequent-access class after 30 days, to an archive class after 90 days, and deletes them after 365 days. Adjust the numbers to your own retention rules.
{
"Rules": [
{
"ID": "age-out-logs",
"Status": "Enabled",
"Filter": { "Prefix": "logs/" },
"Transitions": [
{ "Days": 30, "StorageClass": "STANDARD_IA" },
{ "Days": 90, "StorageClass": "GLACIER" }
],
"Expiration": { "Days": 365 }
}
]
}Apply it to a bucket with this command, replacing the bucket name with your own:
aws s3api put-bucket-lifecycle-configuration \
--bucket example-bucket \
--lifecycle-configuration file://lifecycle.jsonCheck that the retention period in the rule matches your legal and business requirements before you apply it. Expiration permanently deletes data.
Hardware patterns
Match the instance to the workload. An oversized instance with low CPU use wastes energy. Compute Optimizer and CloudWatch metrics show where instances are over-provisioned. AWS Graviton-based instances often provide more work per watt for compatible workloads, but you must confirm that your software runs on the Arm architecture and test performance before you migrate.
Development and deployment
Build and test systems consume resources too. Run pipelines on demand rather than keeping build servers idle. Delete preview environments when a branch merges. Test with representative but smaller data sets when full-scale data is not needed.
Measuring impact
You cannot improve what you do not measure. Two kinds of measure matter.
- Proxy metrics are resource-use figures you already collect, such as vCPU-hours, storage in GB-months, and data transferred. They are easy to get and correlate with energy use.
- Business metrics express output, such as orders processed or active users.
Divide a proxy metric by a business metric to get an intensity figure, for example vCPU-hours per 1,000 orders. If total usage rises but intensity falls, the workload is getting more efficient while it grows.
AWS also offers a Customer Carbon Footprint Tool in the Billing console, which estimates the emissions associated with your AWS usage. Treat it as an account-level view. For workload-level decisions, proxy metrics tagged by workload are usually more actionable.
Common errors
- Chasing absolute totals. A growing business uses more resources. Track intensity per unit of work, or you will read growth as failure.
- Moving Regions for carbon alone. A move that adds latency or breaks data residency rules can harm users and cost more. Check the constraints first.
- Deleting data without a retention check. Lifecycle expiration is permanent. Confirm legal holds and recovery needs.
- Over-optimizing small items. Shrinking a tiny development instance saves little. Start with the largest and most idle consumers.
- Treating managed services as a guarantee. They help, but a poorly configured managed service can still sit idle at high capacity.
Trade-offs with other pillars
Sustainability often aligns with Cost Optimization, since using fewer resources lowers cost. Conflicts do appear.
- Reliability. Extra replicas and multi-Region deployments improve availability but increase resource use. Match redundancy to the real recovery objectives rather than defaulting to the maximum.
- Performance Efficiency. Aggressive scale-in can raise latency when traffic rises suddenly. Tune scaling so users do not wait.
- Operational Excellence. Cleaning up unused resources needs automation and tagging. That takes engineering time up front.
Putting it together
A practical order of work for an existing workload is:
- Tag resources by workload so you can measure them.
- Pick one business metric and compute an intensity figure.
- Identify idle and oversized resources, and remove or right-size them.
- Add lifecycle rules to data stores.
- Review Region choice for new or batch workloads.
- Re-measure after each change and record the result, ideally in a milestone.
Exercise
A team runs a nightly report job on an always-on large EC2 instance that sits at under 5 percent CPU for 22 hours a day. Name two changes that improve sustainability and say what metric you would use to show the improvement.
Show answer
Possible changes: run the job on a smaller instance, or move it to an on-demand or scheduled service such as a scheduled container task or serverless job, so compute exists only while the report runs. Also consider stopping the instance outside the job window. Show the improvement with an intensity metric, for example vCPU-hours per report produced, which should fall after the change. Check that the job still finishes within its time window.
Exercise
Your application serves users in Europe and must keep personal data in the EU. Two EU Regions meet your latency needs, and one uses a lower-carbon energy mix. How should you decide?
Show answer
Latency and data residency are satisfied by both Regions, so the remaining criteria are service availability, price, and carbon intensity. If the lower-carbon Region offers all the services you need at a comparable price, choose it. If it lacks a required service or costs much more, weigh that against the benefit and document the decision.