Table: awscfn_mapping
The Mappings section matches a key to a corresponding set of named values. For example, if you want to set values based on a region, you can create a mapping that uses the region name as a key and contains the values you want to specify for each specific region.
Examples
For all examples below, assume we're using a CloudFormation template with the following Mappings
section:
Mappings: RegionMap: us-east-1: "HVM64": "ami-0ff8a91507f77f867" us-west-1: "HVM64": "ami-0bdb828fd58c52235" eu-west-1: "HVM64": "ami-047bb4163c506cd98" ap-southeast-1: "HVM64": "ami-08569b978cc4dfa10" ap-northeast-1: "HVM64": "ami-06cd52961ce9f0d85"
Basic info
select map, key, name, value, pathfrom awscfn_mapping;
List all HVM64 AMI IDs
select map, key, name, value as hvm64_ami_id, pathfrom awscfn_mappingwhere map = 'RegionMap' and name = 'HVM64';
Get the HVM64 AMI ID in us-east-1
select map, key, name, value as hvm64_ami_id, pathfrom awscfn_mappingwhere map = 'RegionMap' and key = 'us-east-1' and name = 'HVM64';
Get the region whose HVM64 AMI ID is "ami-0bdb828fd58c52235"
select map, key, name, value as hvm64_ami_id, pathfrom awscfn_mappingwhere map = 'RegionMap' and name = 'HVM64' and value = 'ami-0bdb828fd58c52235';
.inspect awscfn_mapping
CloudFormation mapping information.
Name | Type | Description |
---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. |
key | text | The key name that maps to name-value pairs. |
map | text | Mapping name. |
name | text | The name from the name-value pair. |
path | text | Path to the file. |
start_line | bigint | Starting line number. |
value | text | The value from the name-value pair. |