Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/aws-samples/sample-well-architected-skills-and-steering/llms.txt

Use this file to discover all available pages before exploring further.

The sustainability-optimization skill teaches your AI coding agent to assess workloads against the AWS Well-Architected Sustainability pillar. It examines actual code and infrastructure-as-code to find resource waste, inefficient compute choices, missing data lifecycle policies, and architectural patterns that consume more energy than necessary — then produces a prioritized remediation plan with concrete efficiency gains.

What it does

Compute Efficiency

Identifies x86 workloads where Graviton/arm64 applies, always-on resources that could scale to zero, and non-production environments running 24/7 at full capacity.

Data & Storage Lifecycle

Flags S3 buckets without lifecycle policies, CloudWatch logs with unlimited retention, DynamoDB tables missing TTL, and uncompressed data stores.

Architecture Patterns

Finds polling patterns that could be event-driven, chatty APIs causing excess network round-trips, and self-managed infrastructure where managed equivalents offer better utilization.

Development Practices

Reviews Docker image sizes, CI/CD caching, test environment teardown policies, and artifact retention to reduce build and delivery waste.

WA Sustainability pillar coverage

The skill evaluates all six Sustainability pillar questions with evidence sourced from your codebase.
Reviews region configurations and documentation for carbon-intensity rationale. Flags deployments in high-carbon regions where latency requirements don’t justify the placement.
Examines auto-scaling configurations, scheduled scaling rules, and event-driven architecture patterns to verify resources can scale to zero during idle periods.
Checks for managed service adoption, asynchronous processing, batch operations, and caching layers that eliminate redundant computation.
Audits S3 lifecycle policies, Intelligent-Tiering adoption, compression configurations, TTL settings on DynamoDB tables, and backup retention policies.
Reports Graviton/arm64 adoption rate across Lambda, EC2, Fargate, and ECS. Flags older instance generations (m4, t2) and provisioned concurrency on non-latency-critical Lambdas.
Reviews multi-stage Docker builds, CI/CD layer caching, incremental build configurations, and test environment auto-teardown policies.

How to invoke it

Ask your AI coding agent any of the following — the skill activates automatically:
Run a sustainability review of this codebase

What the agent analyzes

1

Compute efficiency discovery

The agent scans instance type selections, Lambda architecture settings (arm64 vs x86_64), auto-scaling min/max values, and whether provisioned concurrency is justified. It documents every compute resource with its file path and line number.
2

Data and storage lifecycle

Every S3 bucket, DynamoDB table, CloudWatch log group, and backup policy is inspected. Missing lifecycle rules, unlimited retention, and absent TTL configurations are flagged with direct code references.
3

Architecture efficiency

The agent identifies polling loops, synchronous chains that could be async, individual API calls where batch operations exist, and self-managed infrastructure (Kafka, Redis) where managed equivalents (MSK, ElastiCache) provide shared-infrastructure efficiency.
4

Checkpoint — confirm before proceeding

The skill pauses and summarizes its discoveries before evaluating findings against the WA framework questions. You confirm before the assessment continues.
5

WA framework evaluation

Each of SUS 1–6 is scored with status, evidence (file:line), gaps, and risk level.
6

Prioritized remediation plan

Findings are organized into Quick Wins (<1 week), Foundation (1–4 weeks), and Strategic (1–3 months) tracks, each showing resource impact and implementation effort.

Example output

The skill produces a structured Sustainability Assessment report:
# Sustainability Assessment: payments-service

## Executive Summary
- Date: 2025-06-01
- Packages Analyzed: infrastructure/, src/
- Findings: 3 High Impact, 5 Medium Impact, 4 Low Impact
- Overall Sustainability Maturity: 2/5 — Graviton adoption absent; no lifecycle policies
- Key Opportunities: Migrate Lambda to arm64, add S3 lifecycle rules, enable scheduled scaling

## Sustainability Scorecard
| Domain                   | Score | Key Strength              | Key Gap                          |
|--------------------------|-------|---------------------------|----------------------------------|
| Compute Efficiency       | 2/5   | Lambda used for async jobs | All functions on x86_64          |
| Data & Storage           | 1/5   | S3 versioning enabled     | No lifecycle rules on any bucket |
| Architecture Efficiency  | 3/5   | SQS used for decoupling   | Two polling loops remain         |
| Development & Deployment | 2/5   | Docker multi-stage builds | No CI layer caching              |
| Hardware & Region        | 2/5   | us-east-1 (lower carbon)  | m4.large instances still in use  |

## High Impact Findings
**SUS-001** | Compute | Lambda functions on x86_64
All 14 Lambda functions use x86_64. Switching to arm64 reduces energy per invocation by
up to 34% while improving price-performance.
Evidence: infrastructure/lambda-stack.ts:42, :67, :91
Recommendation: Add `architecture: lambda.Architecture.ARM_64` to each FunctionProps
Effort: Low (configuration change)

Resource efficiency opportunities

The report includes a dedicated table mapping current configurations to optimized alternatives:
| Resource          | Current Config         | Optimized Config              | Efficiency Gain       | Evidence                  |
|-------------------|------------------------|-------------------------------|-----------------------|---------------------------|
| ProcessOrderFn    | x86_64, 512 MB         | arm64, 512 MB                 | ~34% energy reduction | lambda-stack.ts:42        |
| orders-raw bucket | No lifecycle policy    | IA after 30d, Glacier 90d     | Eliminates cold data  | s3-stack.ts:28            |
| audit-logs group  | Retention: never       | Retention: 90 days            | Log storage reduced   | cloudwatch-stack.ts:15    |
| api-cache cluster | r6g (x86)              | r7g (Graviton3)               | ~20% better perf/watt | elasticache-stack.ts:33   |

Effectiveness

Evaluated using an automated LLM-as-judge framework with paired comparison (same prompt, with and without skill context) using Claude Opus 4.8.
BaselineWith skillDelta
Score85%100%+15%
The skill is particularly effective at surfacing missing data lifecycle policies and Graviton migration opportunities that a bare agent typically overlooks when no specific sustainability prompt is given.

AWS tools referenced in the output

Customer Carbon Footprint Tool

Track your AWS emissions directly in the AWS Management Console — the skill recommends enabling this to establish a baseline.

AWS Compute Optimizer

Right-size recommendations with explicit Graviton suggestions. The skill flags which resources should be submitted to Compute Optimizer for runtime analysis.

S3 Storage Lens

Storage efficiency insights and access pattern analysis — recommended for buckets where Intelligent-Tiering decision cannot be made from code alone.

AWS Trusted Advisor

Idle resource detection for runtime waste not visible in IaC. The skill notes when Trusted Advisor data would sharpen a finding.
SkillWhen to use instead
cost-optimization-reviewFocus on spend reduction, right-sizing, and pricing model changes rather than carbon footprint
performance-efficiencyFocus on latency, throughput, and resource selection for performance targets
wa-reviewRun a full cross-pillar review including Sustainability alongside all five other pillars

Build docs developers (and LLMs) love