Skip to content

aws.cloudformation.describe_stack_instance

Example SQL Queries

SELECT * FROM
aws.cloudformation.describe_stack_instance
WHERE
"stack_set_name" = 'VALUE'
AND "stack_instance_account" = 'VALUE'
AND "stack_instance_region" = 'VALUE';

Description

Returns the stack instance that's associated with the specified StackSet, Amazon Web Services account, and Amazon Web Services Region.

For a list of stack instances that are associated with a specific StackSet, use ListStackInstances.

Table Definition

Column NameColumn Data Type
stack_instance_account Required Input Column

The ID of an Amazon Web Services account that's associated with this stack instance.

VARCHAR
stack_instance_region Required Input Column

The name of a Region that's associated with this stack instance.

VARCHAR
stack_set_name Required Input Column

The name or the unique stack ID of the stack set that you want to get stack instance information for.

VARCHAR
call_as Input Column

[Service-managed permissions] Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.

By default, SELF is specified. Use SELF for stack sets with self-managed permissions.

  • If you are signed in to the management account, specify SELF.

  • If you are signed in to a delegated administrator account, specify DELEGATED_ADMIN.

    Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see Register a delegated administrator in the CloudFormation User Guide.

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_instance

The stack instance that matches the specified request parameters.

STRUCT(
"stack_set_id" VARCHAR,
"region" VARCHAR,
"account" VARCHAR,
"stack_id" VARCHAR,
"parameter_overrides" STRUCT(
"parameter_key" VARCHAR,
"parameter_value" VARCHAR,
"use_previous_value" BOOLEAN,
"resolved_value" VARCHAR
)[],
"status" VARCHAR,
"stack_instance_status" STRUCT(
"detailed_status" VARCHAR
),
"status_reason" VARCHAR,
"organizational_unit_id" VARCHAR,
"drift_status" VARCHAR,
"last_drift_check_timestamp" TIMESTAMP_S,
"last_operation_id" VARCHAR
)
Show child fields
stack_instance.account

[Self-managed permissions] The name of the Amazon Web Services account that the stack instance is associated with.

stack_instance.drift_status

Status of the stack instance's actual configuration compared to the expected template and parameter configuration of the stack set to which it belongs.

  • DRIFTED: The stack differs from the expected template and parameter configuration of the stack set to which it belongs. A stack instance is considered to have drifted if one or more of the resources in the associated stack have drifted.

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

  • IN_SYNC: The stack instance's actual configuration matches its expected stack set configuration.

  • UNKNOWN: This value is reserved for future use.

stack_instance.last_drift_check_timestamp

Most recent time when CloudFormation performed a drift detection operation on the stack instance. This value will be NULL for any stack instance on which drift detection hasn't yet been performed.

stack_instance.last_operation_id

The last unique ID of a StackSet operation performed on a stack instance.

stack_instance.organizational_unit_id

[Service-managed permissions] The organization root ID or organizational unit (OU) IDs that you specified for DeploymentTargets.

stack_instance.parameter_overrides[]
Show child fields
stack_instance.parameter_overrides[].parameter_key

The key associated with the parameter. If you don't specify a key and value for a particular parameter, CloudFormation uses the default value that's specified in your template.

stack_instance.parameter_overrides[].parameter_value

The input value associated with the parameter.

stack_instance.parameter_overrides[].resolved_value

Read-only. The value that corresponds to a SSM parameter key. This field is returned only for SSM parameter types in the template.

stack_instance.parameter_overrides[].use_previous_value

During a stack update, use the existing parameter value that the stack is using for a given parameter key. If you specify true, do not specify a parameter value.

stack_instance.region

The name of the Amazon Web Services Region that the stack instance is associated with.

stack_instance.stack_id

The ID of the stack instance.

stack_instance.stack_instance_status

The detailed status of the stack instance.

Show child fields
stack_instance.stack_instance_status.detailed_status
  • CANCELLED: The operation in the specified account and Region has been canceled. This is either because a user has stopped the stack set operation, or because the failure tolerance of the stack set operation has been exceeded.

  • FAILED: The operation in the specified account and Region failed. If the stack set operation fails in enough accounts within a Region, the failure tolerance for the stack set operation as a whole might be exceeded.

  • FAILED_IMPORT: The import of the stack instance in the specified account and Region failed and left the stack in an unstable state. Once the issues causing the failure are fixed, the import operation can be retried. If enough stack set operations fail in enough accounts within a Region, the failure tolerance for the stack set operation as a whole might be exceeded.

  • INOPERABLE: A DeleteStackInstances operation has failed and left the stack in an unstable state. Stacks in this state are excluded from further UpdateStackSet operations. You might need to perform a DeleteStackInstances operation, with RetainStacks set to true, to delete the stack instance, and then delete the stack manually.

  • PENDING: The operation in the specified account and Region has yet to start.

  • RUNNING: The operation in the specified account and Region is currently in progress.

  • SKIPPED_SUSPENDED_ACCOUNT: The operation in the specified account and Region has been skipped because the account was suspended at the time of the operation.

  • SUCCEEDED: The operation in the specified account and Region completed successfully.

stack_instance.stack_set_id

The name or unique ID of the stack set that the stack instance is associated with.

stack_instance.status

The status of the stack instance, in terms of its synchronization with its associated stack set.

  • INOPERABLE: A DeleteStackInstances operation has failed and left the stack in an unstable state. Stacks in this state are excluded from further UpdateStackSet operations. You might need to perform a DeleteStackInstances operation, with RetainStacks set to true, to delete the stack instance, and then delete the stack manually. INOPERABLE can be returned here when the cause is a failed import. If it's due to a failed import, the operation can be retried once the failures are fixed. To see if this is due to a failed import, look at the DetailedStatus member in the StackInstanceSummary member that is a peer to this Status member.

  • OUTDATED: The stack isn't currently up to date with the stack set because:

    • The associated stack failed during a CreateStackSet or UpdateStackSet operation.

    • The stack was part of a CreateStackSet or UpdateStackSet operation that failed or was stopped before the stack was created or updated.

  • CURRENT: The stack is currently up to date with the stack set.

stack_instance.status_reason

The explanation for the specific status code that's assigned to this stack instance.