How much carbon is your server emitting?

Using Green Cost Explorer to understand emissions from AWS services

No items found.

Nov 1, 2019

How much carbon is your server emitting?

Using Green Cost Explorer to understand emissions from AWS services

Guest

No items found.

Guest

Nov 1, 2019

One place that is often overlooked when calculating carbon use is energy spend by compute infrastructure.

Last year, we wrote about how we went carbon neutral and re-affirmed our commitment to offset emissions. We calculated our footprint across many parts of Mapbox, from travel to powering our offices and all the way down to the nitty-gritty of lunch catering. We used various tools to add up our energy usage and carbon emissions (CO2e) and make savings where possible. In places where it wasn’t yet possible to make that change, we purchased equivalent carbon offsets and renewable energy credits.

This year we did all that, and also dug deeper into the energy use of our cloud computing infrastructure, most of which runs on AWS.

In collaboration with Chris Adams from the Green Web Foundation, we developed the Green Cost Explorer to better understand these emissions.

Sustainability on AWS Compute

AWS announced that it exceeded 50% renewable energy use in 2018 — powered by more than 100 renewable energy projects around the world. However, it is not yet 100% carbon-neutral. Amazon has committed to be 100% renewable-powered by 2030. (In contrast, Google Cloud runs on 100% renewable energy and Microsoft Azure has been carbon-neutral since 2012.)

Amazon renewable energy projects

AWS publishes the list of which data centers are 100% carbon-neutral by default. This is great — it means that any workload you run on those data centers will be carbon-offset. Mapbox compute runs currently in nine different AWS regions — some of which are fully carbon-neutral, some of which are not. Here you can see which regions are carbon-neutral:

The five AWS Regions with a green leaf are carbon-neutral. Source: awsgeek.com

Exploring green cost

Let’s dig into the numbers. AWS supplies us with a flat number of total carbon use across the whole account. However, we wanted more granular visibility into the spending to see which services were not running on sustainable data centers, and where we could save carbon.

Green vs. Grey (carbon-neutral vs not) cost summary for your AWS account. (Sample numbers)

Green Cost Explorer uses the AWS Cost Explorer API and data from AWS’s sustainability pages to get cost of each AWS product you use per region. You can then export the data in different formats to dig deeper in your setup.

Of course, cost is not a totally accurate indicator of carbon spend. However, in many cases, cost on AWS is calculated around compute unit utilization. So while the mapping may not be 1-to-1, it is a decent indicator of where your carbon-heavy hitters may lie.

Green vs. Grey (carbon-neutral vs not) cost breakdown for your AWS account. (Sample numbers)

What can you do?

Use green-cost-explorer to track “green cost” of your AWS workloads. You’ll gain more insight into where your grey cost is, and which services are driving it. You may be able to transfer some of your workloads into a different region to maximize your use of AWS’s sustainable regions! (But keep in mind that data transfer and network usage also cost energy and money, so make smart decisions based on locality of your users.) Check out green-cost-explorer on Github to explore your breakdown of sustainable vs not-sustainable spend.

Maximize your compute utilization by using containerised infrastructure. We run on Docker on AWS ECS to power our computing workloads. Read about how we switched to AWS ECS on Spot and saved money and energy in the process.

Learn more about sustainable tech. There are other ways you can green your tech stack. Check out Chris Adam’s talk on the topic to learn more.

No items found.
No items found.

Maps feature data from Mapbox © Mapbox, OpenStreetMap © OpenStreetMap and their data partners, including Maxar (if applicable, © Maxar).

Related articles