You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clients/client-batch/src/Batch.ts
+40-4Lines changed: 40 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -170,10 +170,11 @@ export class Batch extends BatchClient {
170
170
* your container instances into that Amazon ECS cluster. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_container_instance.html">Launching an Amazon ECS container instance</a> in the
171
171
* <i>Amazon Elastic Container Service Developer Guide</i>.</p>
172
172
* <note>
173
-
* <p>Batch doesn't upgrade the AMIs in a compute environment after the environment is created. For example, it
174
-
* doesn't update the AMIs when a newer version of the Amazon ECS optimized AMI is available. Therefore, you're responsible
175
-
* for managing the guest operating system (including its updates and security patches) and any additional application
176
-
* software or utilities that you install on the compute resources. To use a new AMI for your Batch jobs, complete
173
+
* <p>Batch doesn't automatically upgrade the AMIs in a compute environment after it's created. For example, it
174
+
* also doesn't update the AMIs in your compute environment when a newer version of the Amazon ECS optimized AMI is
175
+
* available. You're responsible for the management of the guest operating system. This includes any updates and
176
+
* security patches. You're also responsible for any additional application software or utilities that you install on
177
+
* the compute resources. There are two ways to use a new AMI for your Batch jobs. The original method is to complete
177
178
* these steps:</p>
178
179
* <ol>
179
180
* <li>
@@ -189,6 +190,41 @@ export class Batch extends BatchClient {
189
190
* <p>Delete the earlier compute environment.</p>
190
191
* </li>
191
192
* </ol>
193
+
* <p>In April 2022, Batch added enhanced support for updating compute environments. For more information, see
* environments</a>. To use the enhanced updating of compute environments to update AMIs, follow these
196
+
* rules:</p>
197
+
* <ul>
198
+
* <li>
199
+
* <p>Either do not set the service role (<code>serviceRole</code>) parameter or set it to the <b>AWSBatchServiceRole</b> service-linked role.</p>
200
+
* </li>
201
+
* <li>
202
+
* <p>Set the allocation strategy (<code>allocationStrategy</code>) parameter to <code>BEST_FIT_PROGRESSIVE</code>
203
+
* or <code>SPOT_CAPACITY_OPTIMIZED</code>.</p>
204
+
* </li>
205
+
* <li>
206
+
* <p>Set the update to latest image version (<code>updateToLatestImageVersion</code>) parameter to
207
+
* <code>true</code>.</p>
208
+
* </li>
209
+
* <li>
210
+
* <p>Do not specify an AMI ID in <code>imageId</code>, <code>imageIdOverride</code> (in <a href="https://docs.aws.amazon.com/batch/latest/APIReference/API_Ec2Configuration.html">
211
+
* <code>ec2Configuration</code>
212
+
* </a>), or in the launch template (<code>launchTemplate</code>). In that case
213
+
* Batch will select the latest Amazon ECS optimized AMI supported by Batch at the time the infrastructure update is
214
+
* initiated. Alternatively you can specify the AMI ID in the <code>imageId</code> or <code>imageIdOverride</code>
215
+
* parameters, or the launch template identified by the <code>LaunchTemplate</code> properties. Changing any of these
216
+
* properties will trigger an infrastructure update. If the AMI ID is specified in the launch template, it can not be
217
+
* replaced by specifying an AMI ID in either the <code>imageId</code> or <code>imageIdOverride</code> parameters. It
218
+
* can only be replaced by specifying a different launch template, or if the launch template version is set to
219
+
* <code>$Default</code> or <code>$Latest</code>, by setting either a new default version for the launch template
220
+
* (if <code>$Default</code>)or by adding a new version to the launch template (if <code>$Latest</code>).</p>
221
+
* </li>
222
+
* </ul>
223
+
* <p>If these rules are followed, any update that triggers an infrastructure update will cause the AMI ID to be
224
+
* re-selected. If the <code>version</code> setting in the launch template (<code>launchTemplate</code>) is set to
225
+
* <code>$Latest</code> or <code>$Default</code>, the latest or default version of the launch template will be
226
+
* evaluated up at the time of the infrastructure update, even if the <code>launchTemplate</code> was not
* your container instances into that Amazon ECS cluster. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_container_instance.html">Launching an Amazon ECS container instance</a> in the
43
43
* <i>Amazon Elastic Container Service Developer Guide</i>.</p>
44
44
* <note>
45
-
* <p>Batch doesn't upgrade the AMIs in a compute environment after the environment is created. For example, it
46
-
* doesn't update the AMIs when a newer version of the Amazon ECS optimized AMI is available. Therefore, you're responsible
47
-
* for managing the guest operating system (including its updates and security patches) and any additional application
48
-
* software or utilities that you install on the compute resources. To use a new AMI for your Batch jobs, complete
45
+
* <p>Batch doesn't automatically upgrade the AMIs in a compute environment after it's created. For example, it
46
+
* also doesn't update the AMIs in your compute environment when a newer version of the Amazon ECS optimized AMI is
47
+
* available. You're responsible for the management of the guest operating system. This includes any updates and
48
+
* security patches. You're also responsible for any additional application software or utilities that you install on
49
+
* the compute resources. There are two ways to use a new AMI for your Batch jobs. The original method is to complete
* environments</a>. To use the enhanced updating of compute environments to update AMIs, follow these
68
+
* rules:</p>
69
+
* <ul>
70
+
* <li>
71
+
* <p>Either do not set the service role (<code>serviceRole</code>) parameter or set it to the <b>AWSBatchServiceRole</b> service-linked role.</p>
72
+
* </li>
73
+
* <li>
74
+
* <p>Set the allocation strategy (<code>allocationStrategy</code>) parameter to <code>BEST_FIT_PROGRESSIVE</code>
75
+
* or <code>SPOT_CAPACITY_OPTIMIZED</code>.</p>
76
+
* </li>
77
+
* <li>
78
+
* <p>Set the update to latest image version (<code>updateToLatestImageVersion</code>) parameter to
79
+
* <code>true</code>.</p>
80
+
* </li>
81
+
* <li>
82
+
* <p>Do not specify an AMI ID in <code>imageId</code>, <code>imageIdOverride</code> (in <a href="https://docs.aws.amazon.com/batch/latest/APIReference/API_Ec2Configuration.html">
83
+
* <code>ec2Configuration</code>
84
+
* </a>), or in the launch template (<code>launchTemplate</code>). In that case
85
+
* Batch will select the latest Amazon ECS optimized AMI supported by Batch at the time the infrastructure update is
86
+
* initiated. Alternatively you can specify the AMI ID in the <code>imageId</code> or <code>imageIdOverride</code>
87
+
* parameters, or the launch template identified by the <code>LaunchTemplate</code> properties. Changing any of these
88
+
* properties will trigger an infrastructure update. If the AMI ID is specified in the launch template, it can not be
89
+
* replaced by specifying an AMI ID in either the <code>imageId</code> or <code>imageIdOverride</code> parameters. It
90
+
* can only be replaced by specifying a different launch template, or if the launch template version is set to
91
+
* <code>$Default</code> or <code>$Latest</code>, by setting either a new default version for the launch template
92
+
* (if <code>$Default</code>)or by adding a new version to the launch template (if <code>$Latest</code>).</p>
93
+
* </li>
94
+
* </ul>
95
+
* <p>If these rules are followed, any update that triggers an infrastructure update will cause the AMI ID to be
96
+
* re-selected. If the <code>version</code> setting in the launch template (<code>launchTemplate</code>) is set to
97
+
* <code>$Latest</code> or <code>$Default</code>, the latest or default version of the launch template will be
98
+
* evaluated up at the time of the infrastructure update, even if the <code>launchTemplate</code> was not
99
+
* updated.</p>
64
100
* </note>
65
101
* @example
66
102
* Use a bare-bones client and the command you need to make an API call.
0 commit comments