2026/03/31 - AWS Sustainability - 2 new api methods
Changes This is the first release of the AWS Sustainability SDK, which enables customers to access their sustainability impact data via API.
Returns estimated carbon emission values based on customer grouping and filtering parameters. We recommend using pagination to ensure that the operation returns quickly and successfully.
See also: AWS API Documentation
Request Syntax
client.get_estimated_carbon_emissions(
TimePeriod={
'Start': datetime(2015, 1, 1),
'End': datetime(2015, 1, 1)
},
GroupBy=[
'USAGE_ACCOUNT_ID'|'REGION'|'SERVICE',
],
FilterBy={
'Dimensions': {
'string': [
'string',
]
}
},
EmissionsTypes=[
'TOTAL_LBM_CARBON_EMISSIONS'|'TOTAL_MBM_CARBON_EMISSIONS'|'TOTAL_SCOPE_1_CARBON_EMISSIONS'|'TOTAL_SCOPE_2_LBM_CARBON_EMISSIONS'|'TOTAL_SCOPE_2_MBM_CARBON_EMISSIONS'|'TOTAL_SCOPE_3_LBM_CARBON_EMISSIONS'|'TOTAL_SCOPE_3_MBM_CARBON_EMISSIONS',
],
Granularity='YEARLY_CALENDAR'|'YEARLY_FISCAL'|'QUARTERLY_CALENDAR'|'QUARTERLY_FISCAL'|'MONTHLY',
GranularityConfiguration={
'FiscalYearStartMonth': 123
},
MaxResults=123,
NextToken='string'
)
dict
[REQUIRED]
The date range for fetching estimated carbon emissions.
Start (datetime) -- [REQUIRED]
The start (inclusive) of the time period. ISO-8601 formatted timestamp, for example: YYYY-MM-DDThh:mm:ss.sssZ
End (datetime) -- [REQUIRED]
The end (exclusive) of the time period. ISO-8601 formatted timestamp, for example: YYYY-MM-DDThh:mm:ss.sssZ
list
The dimensions available for grouping estimated carbon emissions.
(string) --
Specifies the dimensions available for grouping and filtering emissions data.
dict
The criteria for filtering estimated carbon emissions.
Dimensions (dict) --
Filters emission values by specific dimension values.
(string) --
Specifies the dimensions available for grouping and filtering emissions data.
(list) --
(string) --
list
The emission types to include in the results. If absent, returns TOTAL_LBM_CARBON_EMISSIONS and TOTAL_MBM_CARBON_EMISSIONS emissions types.
(string) --
Specifies the types of carbon emissions calculations available.
string
The time granularity for the results. If absent, uses MONTHLY time granularity.
dict
Configuration for fiscal year calculations when using YEARLY_FISCAL or QUARTERLY_FISCAL granularity.
FiscalYearStartMonth (integer) --
The month (1-12) when the fiscal year begins. Used for YEARLY_FISCAL and QUARTERLY_FISCAL granularity. Defaults to 1 (January).
integer
The maximum number of results to return in a single call. Default is 40.
string
The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.
dict
Response Syntax
{
'Results': [
{
'TimePeriod': {
'Start': datetime(2015, 1, 1),
'End': datetime(2015, 1, 1)
},
'DimensionsValues': {
'string': 'string'
},
'ModelVersion': 'string',
'EmissionsValues': {
'string': {
'Value': 123.0,
'Unit': 'MTCO2e'
}
}
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Results (list) --
The result of the requested inputs.
(dict) --
Contains estimated carbon emissions data for a specific time period and dimension grouping.
TimePeriod (dict) --
The reporting period for emission values.
Start (datetime) --
The start (inclusive) of the time period. ISO-8601 formatted timestamp, for example: YYYY-MM-DDThh:mm:ss.sssZ
End (datetime) --
The end (exclusive) of the time period. ISO-8601 formatted timestamp, for example: YYYY-MM-DDThh:mm:ss.sssZ
DimensionsValues (dict) --
The dimensions used to group emissions values.
(string) --
Specifies the dimensions available for grouping and filtering emissions data.
(string) --
ModelVersion (string) --
The semantic version-formatted string that indicates the methodology version used to calculate the emission values.
EmissionsValues (dict) --
The emissions values for the requested emissions types.
(string) --
Specifies the types of carbon emissions calculations available.
(dict) --
Represents a carbon emissions quantity with its value and unit of measurement.
Value (float) --
The numeric value of the emissions quantity.
Unit (string) --
The unit of measurement for the emissions value.
NextToken (string) --
The pagination token indicating there are additional pages available. You can use the token in a following request to fetch the next set of results.
Returns the possible dimension values available for a customer's account. We recommend using pagination to ensure that the operation returns quickly and successfully.
See also: AWS API Documentation
Request Syntax
client.get_estimated_carbon_emissions_dimension_values(
TimePeriod={
'Start': datetime(2015, 1, 1),
'End': datetime(2015, 1, 1)
},
Dimensions=[
'USAGE_ACCOUNT_ID'|'REGION'|'SERVICE',
],
MaxResults=123,
NextToken='string'
)
dict
[REQUIRED]
The date range for fetching the dimension values.
Start (datetime) -- [REQUIRED]
The start (inclusive) of the time period. ISO-8601 formatted timestamp, for example: YYYY-MM-DDThh:mm:ss.sssZ
End (datetime) -- [REQUIRED]
The end (exclusive) of the time period. ISO-8601 formatted timestamp, for example: YYYY-MM-DDThh:mm:ss.sssZ
list
[REQUIRED]
The dimensions available for grouping estimated carbon emissions.
(string) --
Specifies the dimensions available for grouping and filtering emissions data.
integer
The maximum number of results to return in a single call. Default is 40.
string
The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.
dict
Response Syntax
{
'Results': [
{
'Dimension': 'USAGE_ACCOUNT_ID'|'REGION'|'SERVICE',
'Value': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Results (list) --
The list of possible dimensions over which the emissions data is aggregated.
(dict) --
Represents a dimension and its corresponding value.
Dimension (string) --
The dimension type that categorizes this entry.
Value (string) --
The value for the specified dimension. Valid values vary based on the dimension type (e.g., us-east-1 for the REGION dimension, AmazonEC2 for the SERVICE dimension).
NextToken (string) --
The pagination token indicating there are additional pages available. You can use the token in a following request to fetch the next set of results.