Optional - Provision Account Names instead of Account IDs

You can use your AWS Organisation data information to enrich your Dashboards with Account Names instead of Account IDs

  1. Create S3 bucket, IAM Policies and Roles

  2. Setup an AWS Lambda function to retrieve AWS Organizations information

  3. Create Organisation Data Table

    Replace (org-data-bucket-name) with the bucket name that is used to aggregate the AWS Organisation data

CREATE EXTERNAL TABLE `organisation_data`(
  `account_number` string,
  `account_arn` string,
  `account_email` string,
  `account_name` string,
  `status` string,
  `joined_method` string,
  `joined_timestamp` string,
  `parent_ou` string)
ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
STORED AS INPUTFORMAT
  'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
  'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION
  's3://(org-data-bucket-name)/organisation-data'
TBLPROPERTIES (
  'has_encrypted_data'='false',
  'transient_lastDdlTime'='1620129772')
  1. Point account_map view to Organisation Data
CREATE OR REPLACE VIEW account_map
SELECT
    "SPLIT_PART"(account_number, '"', 4) account_id,
    "SPLIT_PART"(("SPLIT_PART"(account_name, ': ', 2)), '"', 2) account_name
FROM organisation_data
  1. Trigger Refresh for all SPICE Datasets: summary_view, ec2_running_cost, compute_savings_plan_eligible_spend, s3_view

Image of SPICE Dataset refresh button.