Amazon CloudFront AWS Price List API all Attribute Names and Values

Below is a reference for all attribute names and attribute values in AWS Price List API for Amazon CloudFront.

Note: All the list below are in alphabetical order.

Service Code: AmazonCloudFront

Python Code to get Attribute Names for AmazonCloudFront using Boto3

import boto3

pricing_client = boto3.client('pricing', region_name='us-east-1')

response = pricing_client.describe_services(ServiceCode='AmazonCloudFront')

attribute_names = response['Services'][0]['AttributeNames']

print(attribute_names)
Continue reading Amazon CloudFront AWS Price List API all Attribute Names and Values

Amazon ECR AWS Price List API all Attribute Names and Values

Below is a reference for all attribute names and attribute values in AWS Price List API for Amazon EC2 Container Registry (ECR).

Note: All the list below are in alphabetical order.

Service Code: AmazonECR

Python Code to get Attribute Names for AmazonECR using Boto3

import boto3

pricing_client = boto3.client('pricing', region_name='us-east-1')

response = pricing_client.describe_services(ServiceCode='AmazonECR')

attribute_names = response['Services'][0]['AttributeNames']

print(attribute_names)
Continue reading Amazon ECR AWS Price List API all Attribute Names and Values

Listing AWS Regions using boto3 Python

If you want to programmatically retrieve the AWS regions one of the best ways to do this is via Python boto3 package.

In boto3, specifically the EC2 client, there is a function named describe_regions. This will retrieve the regions that are in AWS.

See different uses of the describe_regions function below.



Basic code for retrieving the AWS Regions using boto3

Here is a basic code for getting the AWS Regions in boto3.

import boto3
    
ec2_client = boto3.client('ec2')

response = ec2_client.describe_regions()

print(response)

response is a dictionary that contains all active regions in the AWS Account.

The output of the Python script above can be seen below. I decided to format the output for easier reading, and show the whole response to easily understand how to manipulate the output.

Continue reading Listing AWS Regions using boto3 Python