Skip to content

aws_kms_key: add key_last_usage column #2753

@darwinw-kvo

Description

@darwinw-kvo

Is your feature request related to a problem? Please describe.
aws_kms_key doesn't expose KeyLastUsage returned by GetKeyLastUsage API. This information could help to decide whether the key is unused or not, especially when deciding KMS key in Pending Deletion state is safe to ignore or not.

Describe the solution you'd like
Add key_last_usage column of type timestamp with,
mapping to the KeyLastUsage.Timestampfield from GetKeyLastUsage API response.

SELECT id, key_last_usage
FROM aws_kms_key;

Describe alternatives you've considered

  • New columns key_last_usage (JSON) and key_tracking_start_date (timestamp with) to follow response structure of GetKeyLastUsage API. Below is the response structure.
{
   "KeyCreationDate": number,
   "KeyId": "string",
   "KeyLastUsage": { 
      "CloudTrailEventId": "string",
      "KmsRequestId": "string",
      "Operation": "string",
      "Timestamp": number
   },
   "TrackingStartDate": number
}
  • New table aws_kms_key_last_usage to retrieve full response from GetKeyLastUsage API.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requeststeampipeSteampipe plugin issues

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions