Table: aws_emr_clusters

This table shows data for Amazon EMR Clusters.

https://docs.aws.amazon.com/emr/latest/APIReference/API_Cluster.html (opens in a new tab)

The primary key for this table is arn.

Relations

The following tables depend on aws_emr_clusters:

Columns

NameType
_cq_iduuid
_cq_parent_iduuid
account_idutf8
regionutf8
arn (PK)utf8
tagsjson
applicationsjson
auto_scaling_roleutf8
auto_terminatebool
cluster_arnutf8
configurationsjson
custom_ami_idutf8
ebs_root_volume_sizeint64
ec2_instance_attributesjson
idutf8
instance_collection_typeutf8
kerberos_attributesjson
log_encryption_kms_key_idutf8
log_uriutf8
master_public_dns_nameutf8
nameutf8
normalized_instance_hoursint64
os_release_labelutf8
outpost_arnutf8
placement_groupsjson
release_labelutf8
repo_upgrade_on_bootutf8
requested_ami_versionutf8
running_ami_versionutf8
scale_down_behaviorutf8
security_configurationutf8
service_roleutf8
statusjson
step_concurrency_levelint64
termination_protectedbool
visible_to_all_usersbool

Example Queries

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

EMR clusters should not have public IP addresses

SELECT
  'EMR clusters should not have public IP addresses' AS title,
  aws_emr_clusters.account_id,
  aws_emr_clusters.arn AS resource_id,
  CASE
  WHEN aws_ec2_subnets.map_public_ip_on_launch
  AND aws_emr_clusters.status->>'State' IN ('RUNNING', 'WAITING')
  THEN 'fail'
  ELSE 'pass'
  END
    AS status
FROM
  aws_emr_clusters
  LEFT JOIN aws_ec2_subnets ON
      aws_emr_clusters.ec2_instance_attributes->>'Ec2SubnetId'
      = aws_ec2_subnets.subnet_id;