Skip to content

aws.cloudformation.list_stack_resources

Example SQL Queries

SELECT * FROM
aws.cloudformation.list_stack_resources
WHERE
"stack_name" = 'VALUE';

Description

Returns descriptions of all resources of the specified stack.

For deleted stacks, ListStackResources returns resource information for up to 90 days after the stack has been deleted.

Table Definition

Column NameColumn Data Type
stack_name Required Input Column

The name or the unique stack ID that is associated with the stack, which aren't always interchangeable:

  • Running stacks: You can specify either the stack's name or its unique stack ID.

  • Deleted stacks: You must specify the unique stack ID.

Default: There is no default value.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
drift_information

Information about whether the resource's actual configuration differs, or has drifted, from its expected configuration, as defined in the stack template and any values specified as template parameters. For more information, see Detecting Unregulated Configuration Changes to Stacks and Resources.

STRUCT(
"stack_resource_drift_status" VARCHAR,
"last_check_timestamp" TIMESTAMP_S
)
Show child fields
drift_information.last_check_timestamp

When CloudFormation last checked if the resource had drifted from its expected configuration.

drift_information.stack_resource_drift_status

Status of the resource's actual configuration compared to its expected configuration.

  • DELETED: The resource differs from its expected configuration in that it has been deleted.

  • MODIFIED: The resource differs from its expected configuration.

  • NOT_CHECKED: CloudFormation hasn't checked if the resource differs from its expected configuration.

    Any resources that don't currently support drift detection have a status of NOT_CHECKED. For more information, see Resources that Support Drift Detection. If you performed an ContinueUpdateRollback operation on a stack, any resources included in ResourcesToSkip will also have a status of NOT_CHECKED. For more information about skipping resources during rollback operations, see Continue Rolling Back an Update in the CloudFormation User Guide.

  • IN_SYNC: The resource's actual configuration matches its expected configuration.

last_updated_timestamp

Time the status was updated.

TIMESTAMP_S
logical_resource_id

The logical name of the resource specified in the template.

VARCHAR
module_info

Contains information about the module from which the resource was created, if the resource was created from a module included in the stack template.

STRUCT(
"type_hierarchy" VARCHAR,
"logical_id_hierarchy" VARCHAR
)
Show child fields
module_info.logical_id_hierarchy

A concatenated list of the logical IDs of the module or modules containing the resource. Modules are listed starting with the inner-most nested module, and separated by /.

In the following example, the resource was created from a module, moduleA, that's nested inside a parent module, moduleB.

moduleA/moduleB

For more information, see Referencing resources in a module in the CloudFormation User Guide.

module_info.type_hierarchy

A concatenated list of the module type or types containing the resource. Module types are listed starting with the inner-most nested module, and separated by /.

In the following example, the resource was created from a module of type AWS::First::Example::MODULE, that's nested inside a parent module of type AWS::Second::Example::MODULE.

AWS::First::Example::MODULE/AWS::Second::Example::MODULE

physical_resource_id

The name or unique identifier that corresponds to a physical instance ID of the resource.

VARCHAR
resource_status

Current status of the resource.

VARCHAR
resource_status_reason

Success/failure message associated with the resource.

VARCHAR
resource_type

Type of resource. (For more information, go to Amazon Web Services Resource Types Reference in the CloudFormation User Guide.)

VARCHAR