Skip to content

aws.cloudformation.describe_stack_resource

Example SQL Queries

SELECT * FROM
aws.cloudformation.describe_stack_resource
WHERE
"stack_name" = 'VALUE'
AND "logical_resource_id" = 'VALUE';

Description

Returns a description of the specified resource in the specified stack.

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

Table Definition

Column NameColumn Data Type
logical_resource_id Required Input Column

The logical name of the resource as specified in the template.

Default: There is no default value.

VARCHAR
stack_name Required Input Column

The name or the unique stack ID that's 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
stack_resource_detail

A StackResourceDetail structure containing the description of the specified resource in the specified stack.

STRUCT(
"stack_name" VARCHAR,
"stack_id" VARCHAR,
"logical_resource_id" VARCHAR,
"physical_resource_id" VARCHAR,
"resource_type" VARCHAR,
"last_updated_timestamp" TIMESTAMP_S,
"resource_status" VARCHAR,
"resource_status_reason" VARCHAR,
"description" VARCHAR,
"metadata" VARCHAR,
"drift_information" STRUCT(
"stack_resource_drift_status" VARCHAR,
"last_check_timestamp" TIMESTAMP_S
),
"module_info" STRUCT(
"type_hierarchy" VARCHAR,
"logical_id_hierarchy" VARCHAR
)
)
Show child fields
stack_resource_detail.description

User defined description associated with the resource.

stack_resource_detail.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.

Show child fields
stack_resource_detail.drift_information.last_check_timestamp

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

stack_resource_detail.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 has not checked if the resource differs from its expected configuration.

    Any resources that do not currently support drift detection have a status of NOT_CHECKED. For more information, see Resources that Support Drift Detection.

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

stack_resource_detail.last_updated_timestamp

Time the status was updated.

stack_resource_detail.logical_resource_id

The logical name of the resource specified in the template.

stack_resource_detail.metadata

The content of the Metadata attribute declared for the resource. For more information, see Metadata Attribute in the CloudFormation User Guide.

stack_resource_detail.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.

Show child fields
stack_resource_detail.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.

stack_resource_detail.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

stack_resource_detail.physical_resource_id

The name or unique identifier that corresponds to a physical instance ID of a resource supported by CloudFormation.

stack_resource_detail.resource_status

Current status of the resource.

stack_resource_detail.resource_status_reason

Success/failure message associated with the resource.

stack_resource_detail.resource_type

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

stack_resource_detail.stack_id

Unique identifier of the stack.

stack_resource_detail.stack_name

The name associated with the stack.