v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1474216311.3 KB

Updates a specified layer.

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

post/#X-Amz-Target=OpsWorks_20130218.UpdateLayer

Headers

X-Amz-Target'OpsWorks_20130218.UpdateLayer' required

Request body

LayerIdstring required

The layer ID.

Namestring

The layer name, which is used by the console.

Shortnamestring
<p>For custom layers only, use this parameter to specify the layer's short name, which is used internally by AWS OpsWorks Stacks and by Chef. The short name is also used as the name for the directory where your app files are installed. It can have a maximum of 200 characters and must be in the following format: /\A[a-z0-9\-\_\.]+\Z/.</p> <p>The built-in layers' short names are defined by AWS OpsWorks Stacks. For more information, see the <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/layers.html">Layer Reference</a> </p>
Attributesobject

One or more user-defined key/value pairs to be added to the stack attributes.

CustomInstanceProfileArnstring

The ARN of an IAM profile to be used for all of the layer's EC2 instances. For more information about IAM ARNs, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">Using Identifiers</a>.

CustomJsonstring

A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the layer's instances. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-json-override.html"> Using Custom JSON</a>.

CustomSecurityGroupIdsString[]

An array containing the layer's custom security group IDs.

PackagesString[]

An array of <code>Package</code> objects that describe the layer's packages.

EnableAutoHealingboolean

Whether to disable auto healing for the layer.

AutoAssignElasticIpsboolean

Whether to automatically assign an <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html">Elastic IP address</a> to the layer's instances. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html">How to Edit a Layer</a>.

AutoAssignPublicIpsboolean

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 <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html">How to Edit a Layer</a>.

InstallUpdatesOnBootboolean
<p>Whether to install operating system and package updates when the instance boots. The default value is <code>true</code>. To control when updates are installed, set this value to <code>false</code>. You must then update your instances manually by using <a>CreateDeployment</a> to run the <code>update_dependencies</code> stack command or manually running <code>yum</code> (Amazon Linux) or <code>apt-get</code> (Ubuntu) on the instances. </p> <note> <p>We strongly recommend using the default value of <code>true</code>, to ensure that your instances have the latest security updates.</p> </note>
UseEbsOptimizedInstancesboolean

Whether to use Amazon EBS-optimized instances.

Response

Success