Table: aws_ssm_documents

This table shows data for AWS Systems Manager (SSM) Documents.

https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_DocumentDescription.html (opens in a new tab)

The primary key for this table is arn.

Relations

The following tables depend on aws_ssm_documents:

Columns

NameType
_cq_iduuid
_cq_parent_iduuid
account_idutf8
regionutf8
arn (PK)utf8
permissionsjson
tagsjson
approved_versionutf8
attachments_informationjson
authorutf8
categorylist<item: utf8, nullable>
category_enumlist<item: utf8, nullable>
created_datetimestamp[us, tz=UTC]
default_versionutf8
descriptionutf8
display_nameutf8
document_formatutf8
document_typeutf8
document_versionutf8
hashutf8
hash_typeutf8
latest_versionutf8
nameutf8
ownerutf8
parametersjson
pending_review_versionutf8
platform_typeslist<item: utf8, nullable>
requiresjson
review_informationjson
review_statusutf8
schema_versionutf8
sha1utf8
statusutf8
status_informationutf8
target_typeutf8
version_nameutf8

Example Queries

These SQL queries are sampled from CloudQuery policies and are compatible with PostgreSQL.

SSM documents should not be public

SELECT
  'SSM documents should not be public' AS title,
  account_id,
  arn AS resource_id,
  CASE
  WHEN 'all' = ANY (ARRAY (SELECT jsonb_array_elements_text(p->'AccountIds')))
  THEN 'fail'
  ELSE 'pass'
  END
    AS status
FROM
  aws_ssm_documents, jsonb_array_elements(aws_ssm_documents.permissions) AS p
WHERE
  owner IN (SELECT account_id FROM aws_iam_accounts);