Skip to content

aws.opsworks.describe_layers

Example SQL Queries

SELECT * FROM
aws.opsworks.describe_layers;

Description

Requests a description of one or more layers in a specified stack.

This call accepts only one resource-identifying parameter.

Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.

Table Definition

Column NameColumn Data Type
layer_ids Input Column

An array of layer IDs that specify the layers to be described. If you omit this parameter, DescribeLayers returns a description of every layer in the specified stack.

VARCHAR[]
Show child fields
layer_ids[]
stack_id Input Column

The stack ID.

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
layers

An array of Layer objects that describe the layers.

STRUCT(
"arn" VARCHAR,
"stack_id" VARCHAR,
"layer_id" VARCHAR,
"type" VARCHAR,
"name" VARCHAR,
"shortname" VARCHAR,
"attributes" MAP(VARCHAR, VARCHAR),
"cloud_watch_logs_configuration" STRUCT(
"enabled" BOOLEAN,
"log_streams" STRUCT(
"log_group_name" VARCHAR,
"datetime_format" VARCHAR,
"time_zone" VARCHAR,
"file" VARCHAR,
"file_fingerprint_lines" VARCHAR,
"multi_line_start_pattern" VARCHAR,
"initial_position" VARCHAR,
"encoding" VARCHAR,
"buffer_duration" BIGINT,
"batch_count" BIGINT,
"batch_size" BIGINT
)[]
),
"custom_instance_profile_arn" VARCHAR,
"custom_json" VARCHAR,
"custom_security_group_ids" VARCHAR[],
"default_security_group_names" VARCHAR[],
"packages" VARCHAR[],
"volume_configurations" STRUCT(
"mount_point" VARCHAR,
"raid_level" BIGINT,
"number_of_disks" BIGINT,
"size" BIGINT,
"volume_type" VARCHAR,
"iops" BIGINT,
"encrypted" BOOLEAN
)[],
"enable_auto_healing" BOOLEAN,
"auto_assign_elastic_ips" BOOLEAN,
"auto_assign_public_ips" BOOLEAN,
"default_recipes" STRUCT(
"setup" VARCHAR[],
"configure" VARCHAR[],
"deploy" VARCHAR[],
"undeploy" VARCHAR[],
"shutdown" VARCHAR[]
),
"custom_recipes" STRUCT(
"setup" VARCHAR[],
"configure" VARCHAR[],
"deploy" VARCHAR[],
"undeploy" VARCHAR[],
"shutdown" VARCHAR[]
),
"created_at" VARCHAR,
"install_updates_on_boot" BOOLEAN,
"use_ebs_optimized_instances" BOOLEAN,
"lifecycle_event_configuration" STRUCT(
"shutdown" STRUCT(
"execution_timeout" BIGINT,
"delay_until_elb_connections_drained" BOOLEAN
)
)
)[]
Show child fields
layers[]
Show child fields
layers[].arn

The Amazon Resource Number (ARN) of a layer.

layers[].attributes

The layer attributes.

For the HaproxyStatsPassword, MysqlRootPassword, and GangliaPassword attributes, OpsWorks Stacks returns *****FILTERED***** instead of the actual value

For an ECS Cluster layer, OpsWorks Stacks the EcsClusterArn attribute is set to the cluster's ARN.

layers[].auto_assign_elastic_ips

Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer.

layers[].auto_assign_public_ips

For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances. For more information, see How to Edit a Layer.

layers[].cloud_watch_logs_configuration

The Amazon CloudWatch Logs configuration settings for the layer.

Show child fields
layers[].cloud_watch_logs_configuration.enabled

Whether CloudWatch Logs is enabled for a layer.

layers[].cloud_watch_logs_configuration.log_streams[]
Show child fields
layers[].cloud_watch_logs_configuration.log_streams[].batch_count

Specifies the max number of log events in a batch, up to 10000. The default value is 1000.

layers[].cloud_watch_logs_configuration.log_streams[].batch_size

Specifies the maximum size of log events in a batch, in bytes, up to 1048576 bytes. The default value is 32768 bytes. This size is calculated as the sum of all event messages in UTF-8, plus 26 bytes for each log event.

layers[].cloud_watch_logs_configuration.log_streams[].buffer_duration

Specifies the time duration for the batching of log events. The minimum value is 5000ms and default value is 5000ms.

layers[].cloud_watch_logs_configuration.log_streams[].datetime_format

Specifies how the time stamp is extracted from logs. For more information, see the CloudWatch Logs Agent Reference.

layers[].cloud_watch_logs_configuration.log_streams[].encoding

Specifies the encoding of the log file so that the file can be read correctly. The default is utf_8. Encodings supported by Python codecs.decode() can be used here.

layers[].cloud_watch_logs_configuration.log_streams[].file

Specifies log files that you want to push to CloudWatch Logs.

File can point to a specific file or multiple files (by using wild card characters such as /var/log/system.log*). Only the latest file is pushed to CloudWatch Logs, based on file modification time. We recommend that you use wild card characters to specify a series of files of the same type, such as access_log.2014-06-01-01, access_log.2014-06-01-02, and so on by using a pattern like access_log.*. Don't use a wildcard to match multiple file types, such as access_log_80 and access_log_443. To specify multiple, different file types, add another log stream entry to the configuration file, so that each log file type is stored in a different log group.

Zipped files are not supported.

layers[].cloud_watch_logs_configuration.log_streams[].file_fingerprint_lines

Specifies the range of lines for identifying a file. The valid values are one number, or two dash-delimited numbers, such as '1', '2-5'. The default value is '1', meaning the first line is used to calculate the fingerprint. Fingerprint lines are not sent to CloudWatch Logs unless all specified lines are available.

layers[].cloud_watch_logs_configuration.log_streams[].initial_position

Specifies where to start to read data (start_of_file or end_of_file). The default is start_of_file. This setting is only used if there is no state persisted for that log stream.

layers[].cloud_watch_logs_configuration.log_streams[].log_group_name

Specifies the destination log group. A log group is created automatically if it doesn't already exist. Log group names can be between 1 and 512 characters long. Allowed characters include a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), '/' (forward slash), and '.' (period).

layers[].cloud_watch_logs_configuration.log_streams[].multi_line_start_pattern

Specifies the pattern for identifying the start of a log message.

layers[].cloud_watch_logs_configuration.log_streams[].time_zone

Specifies the time zone of log event time stamps.

layers[].created_at

Date when the layer was created.

layers[].custom_instance_profile_arn

The ARN of the default IAM profile to be used for the layer's EC2 instances. For more information about IAM ARNs, see Using Identifiers.

layers[].custom_json

A JSON formatted string containing the layer's custom stack configuration and deployment attributes.

layers[].custom_recipes

A LayerCustomRecipes object that specifies the layer's custom recipes.

Show child fields
layers[].custom_recipes.configure[]
layers[].custom_recipes.deploy[]
layers[].custom_recipes.setup[]
layers[].custom_recipes.shutdown[]
layers[].custom_recipes.undeploy[]
layers[].custom_security_group_ids[]
layers[].default_recipes

OpsWorks Stacks supports five lifecycle events: setup, configuration, deploy, undeploy, and shutdown. For each layer, OpsWorks Stacks runs a set of standard recipes for each event. You can also provide custom recipes for any or all layers and events. OpsWorks Stacks runs custom event recipes after the standard recipes. LayerCustomRecipes specifies the custom recipes for a particular layer to be run in response to each of the five events.

To specify a recipe, use the cookbook's directory name in the repository followed by two colons and the recipe name, which is the recipe's file name without the .rb extension. For example: phpapp2::dbsetup specifies the dbsetup.rb recipe in the repository's phpapp2 folder.

Show child fields
layers[].default_recipes.configure[]
layers[].default_recipes.deploy[]
layers[].default_recipes.setup[]
layers[].default_recipes.shutdown[]
layers[].default_recipes.undeploy[]
layers[].default_security_group_names[]
layers[].enable_auto_healing

Whether auto healing is disabled for the layer.

layers[].install_updates_on_boot

Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set to false, you must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances.

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates.

layers[].layer_id

The layer ID.

layers[].lifecycle_event_configuration

A LifeCycleEventConfiguration object that specifies the Shutdown event configuration.

Show child fields
layers[].lifecycle_event_configuration.shutdown

A ShutdownEventConfiguration object that specifies the Shutdown event configuration.

Show child fields
layers[].lifecycle_event_configuration.shutdown.delay_until_elb_connections_drained

Whether to enable Elastic Load Balancing connection draining. For more information, see Connection Draining

layers[].lifecycle_event_configuration.shutdown.execution_timeout

The time, in seconds, that OpsWorks Stacks waits after triggering a Shutdown event before shutting down an instance.

layers[].name

The layer name. Layer names can be a maximum of 32 characters.

layers[].packages[]
layers[].shortname

The layer short name.

layers[].stack_id

The layer stack ID.

layers[].type

The layer type.

layers[].use_ebs_optimized_instances

Whether the layer uses Amazon EBS-optimized instances.

layers[].volume_configurations[]
Show child fields
layers[].volume_configurations[].encrypted

Specifies whether an Amazon EBS volume is encrypted. For more information, see Amazon EBS Encryption.

layers[].volume_configurations[].iops

For PIOPS volumes, the IOPS per disk.

layers[].volume_configurations[].mount_point

The volume mount point. For example "/dev/sdh".

layers[].volume_configurations[].number_of_disks

The number of disks in the volume.

layers[].volume_configurations[].raid_level

The volume RAID level.

layers[].volume_configurations[].size

The volume size.

layers[].volume_configurations[].volume_type

The volume type. For more information, see Amazon EBS Volume Types.

  • standard - Magnetic. Magnetic volumes must have a minimum size of 1 GiB and a maximum size of 1024 GiB.

  • io1 - Provisioned IOPS (SSD). PIOPS volumes must have a minimum size of 4 GiB and a maximum size of 16384 GiB.

  • gp2 - General Purpose (SSD). General purpose volumes must have a minimum size of 1 GiB and a maximum size of 16384 GiB.

  • st1 - Throughput Optimized hard disk drive (HDD). Throughput optimized HDD volumes must have a minimum size of 125 GiB and a maximum size of 16384 GiB.

  • sc1 - Cold HDD. Cold HDD volumes must have a minimum size of 125 GiB and a maximum size of 16384 GiB.