Table: aws_ecs_task_definitions

This table shows data for Amazon Elastic Container Service (ECS) Task Definitions.

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

The primary key for this table is arn.

Columns

NameType
_cq_iduuid
_cq_parent_iduuid
account_idutf8
regionutf8
arn (PK)utf8
tagsjson
compatibilitieslist<item: utf8, nullable>
container_definitionsjson
cpuutf8
deregistered_attimestamp[us, tz=UTC]
ephemeral_storagejson
execution_role_arnutf8
familyutf8
inference_acceleratorsjson
ipc_modeutf8
memoryutf8
network_modeutf8
pid_modeutf8
placement_constraintsjson
proxy_configurationjson
registered_attimestamp[us, tz=UTC]
registered_byutf8
requires_attributesjson
requires_compatibilitieslist<item: utf8, nullable>
revisionint64
runtime_platformjson
statusutf8
task_definition_arnutf8
task_role_arnutf8
volumesjson

Example Queries

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

Amazon ECS task definitions should have secure networking modes and user definitions

SELECT
  'Amazon ECS task definitions should have secure networking modes and user definitions'
    AS title,
  account_id,
  arn AS resource_id,
  CASE
  WHEN network_mode = 'host'
  AND (c->>'Privileged')::BOOL IS NOT true
  AND (c->>'User' = 'root' OR (c->>'User') IS NULL)
  THEN 'fail'
  ELSE 'pass'
  END
    AS status
FROM
  aws_ecs_task_definitions,
  jsonb_array_elements(aws_ecs_task_definitions.container_definitions) AS c;