Skip to content

aws.lightsail.get_container_service_deployments

Example SQL Queries

SELECT * FROM
aws.lightsail.get_container_service_deployments
WHERE
"service_name" = 'VALUE';

Description

Returns the deployments for your Amazon Lightsail container service

A deployment specifies the settings, such as the ports and launch command, of containers that are deployed to your container service.

The deployments are ordered by version in ascending order. The newest version is listed at the top of the response.

A set number of deployments are kept before the oldest one is replaced with the newest one. For more information, see Amazon Lightsail endpoints and quotas in the Amazon Web Services General Reference.

Table Definition

Column NameColumn Data Type
service_name Required Input Column

The name of the container service for which to return deployments.

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
deployments

An array of objects that describe deployments for a container service.

STRUCT(
"version" BIGINT,
"state" VARCHAR,
"containers" MAP(VARCHAR, STRUCT(
"image" VARCHAR,
"command" VARCHAR[],
"environment" MAP(VARCHAR, VARCHAR),
"ports" MAP(VARCHAR, VARCHAR)
)),
"public_endpoint" STRUCT(
"container_name" VARCHAR,
"container_port" BIGINT,
"health_check" STRUCT(
"healthy_threshold" BIGINT,
"unhealthy_threshold" BIGINT,
"timeout_seconds" BIGINT,
"interval_seconds" BIGINT,
"path" VARCHAR,
"success_codes" VARCHAR
)
),
"created_at" TIMESTAMP_S
)[]
Show child fields
deployments[]
Show child fields
deployments[].containers

An object that describes the configuration for the containers of the deployment.

deployments[].created_at

The timestamp when the deployment was created.

deployments[].public_endpoint

An object that describes the endpoint of the deployment.

Show child fields
deployments[].public_endpoint.container_name

The name of the container entry of the deployment that the endpoint configuration applies to.

deployments[].public_endpoint.container_port

The port of the specified container to which traffic is forwarded to.

deployments[].public_endpoint.health_check

An object that describes the health check configuration of the container.

Show child fields
deployments[].public_endpoint.health_check.healthy_threshold

The number of consecutive health checks successes required before moving the container to the Healthy state. The default value is 2.

deployments[].public_endpoint.health_check.interval_seconds

The approximate interval, in seconds, between health checks of an individual container. You can specify between 5 and 300 seconds. The default value is 5.

deployments[].public_endpoint.health_check.path

The path on the container on which to perform the health check. The default value is /.

deployments[].public_endpoint.health_check.success_codes

The HTTP codes to use when checking for a successful response from a container. You can specify values between 200 and 499. You can specify multiple values (for example, 200,202) or a range of values (for example, 200-299).

deployments[].public_endpoint.health_check.timeout_seconds

The amount of time, in seconds, during which no response means a failed health check. You can specify between 2 and 60 seconds. The default value is 2.

deployments[].public_endpoint.health_check.unhealthy_threshold

The number of consecutive health check failures required before moving the container to the Unhealthy state. The default value is 2.

deployments[].state

The state of the deployment.

A deployment can be in one of the following states:

  • ACTIVATING - The deployment is being created.

  • ACTIVE - The deployment was successfully created, and it's currently running on the container service. The container service can have only one deployment in an active state at a time.

  • INACTIVE - The deployment was previously successfully created, but it is not currently running on the container service.

  • FAILED - The deployment failed. Use the GetContainerLog action to view the log events for the containers in the deployment to try to determine the reason for the failure.

deployments[].version

The version number of the deployment.