Skip to content

Commit 9a65822

Browse files
author
awstools
committed
feat(client-mwaa): Amazon MWAA now supports Airflow web server auto scaling to automatically handle increased demand from REST APIs, Command Line Interface (CLI), or more Airflow User Interface (UI) users. Customers can specify maximum and minimum web server instances during environment creation and update workflow.
1 parent 5e19279 commit 9a65822

File tree

6 files changed

+158
-13
lines changed

6 files changed

+158
-13
lines changed

clients/client-mwaa/src/commands/CreateEnvironmentCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ export interface CreateEnvironmentCommandOutput extends CreateEnvironmentOutput,
9494
* MinWorkers: Number("int"),
9595
* Schedulers: Number("int"),
9696
* EndpointManagement: "STRING_VALUE",
97+
* MinWebservers: Number("int"),
98+
* MaxWebservers: Number("int"),
9799
* };
98100
* const command = new CreateEnvironmentCommand(input);
99101
* const response = await client.send(command);

clients/client-mwaa/src/commands/GetEnvironmentCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ export interface GetEnvironmentCommandOutput extends GetEnvironmentOutput, __Met
118118
* // DatabaseVpcEndpointService: "STRING_VALUE",
119119
* // CeleryExecutorQueue: "STRING_VALUE",
120120
* // EndpointManagement: "STRING_VALUE",
121+
* // MinWebservers: Number("int"),
122+
* // MaxWebservers: Number("int"),
121123
* // },
122124
* // };
123125
*

clients/client-mwaa/src/commands/UpdateEnvironmentCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ export interface UpdateEnvironmentCommandOutput extends UpdateEnvironmentOutput,
8686
* WebserverAccessMode: "STRING_VALUE",
8787
* MinWorkers: Number("int"),
8888
* Schedulers: Number("int"),
89+
* MinWebservers: Number("int"),
90+
* MaxWebservers: Number("int"),
8991
* };
9092
* const command = new UpdateEnvironmentCommand(input);
9193
* const response = await client.send(command);

clients/client-mwaa/src/models/models_0.ts

Lines changed: 88 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ export interface CreateEnvironmentInput {
284284
AirflowConfigurationOptions?: Record<string, string>;
285285

286286
/**
287-
* <p>The environment class type. Valid values: <code>mw1.small</code>, <code>mw1.medium</code>, <code>mw1.large</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/environment-class.html">Amazon MWAA environment class</a>.</p>
287+
* <p>The environment class type. Valid values: <code>mw1.small</code>, <code>mw1.medium</code>, <code>mw1.large</code>, <code>mw1.xlarge</code>, and <code>mw1.2xlarge</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/environment-class.html">Amazon MWAA environment class</a>.</p>
288288
* @public
289289
*/
290290
EnvironmentClass?: string;
@@ -345,10 +345,10 @@ export interface CreateEnvironmentInput {
345345
* <p>The number of Apache Airflow schedulers to run in your environment. Valid values:</p>
346346
* <ul>
347347
* <li>
348-
* <p>v2 - Accepts between 2 to 5. Defaults to 2.</p>
348+
* <p>v2 - Accepts between <code>2</code> to <code>5</code>. Defaults to <code>2</code>.</p>
349349
* </li>
350350
* <li>
351-
* <p>v1 - Accepts 1.</p>
351+
* <p>v1 - Accepts <code>1</code>.</p>
352352
* </li>
353353
* </ul>
354354
* @public
@@ -363,6 +363,33 @@ export interface CreateEnvironmentInput {
363363
* @public
364364
*/
365365
EndpointManagement?: EndpointManagement;
366+
367+
/**
368+
* <p>
369+
* The minimum number of web servers that you want to run in your environment.
370+
* Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for <code>MaxWebservers</code>
371+
* when you interact with your Apache Airflow environment using Apache Airflow REST API, or
372+
* the Apache Airflow CLI. As the transaction-per-second rate, and the network load, decrease,
373+
* Amazon MWAA disposes of the additional web servers, and scales down to the number set in <code>MinxWebserers</code>.
374+
* </p>
375+
* <p>Valid values: Accepts between <code>2</code> and <code>5</code>. Defaults to <code>2</code>.</p>
376+
* @public
377+
*/
378+
MinWebservers?: number;
379+
380+
/**
381+
* <p>
382+
* The maximum number of web servers that you want to run in your environment.
383+
* Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for <code>MaxWebservers</code>
384+
* when you interact with your Apache Airflow environment using Apache Airflow REST API, or
385+
* the Apache Airflow CLI. For example, in scenarios where your workload requires network calls to the Apache Airflow REST API with a high transaction-per-second (TPS)
386+
* rate, Amazon MWAA will increase the number of web servers up to the number set in <code>MaxWebserers</code>. As TPS rates decrease
387+
* Amazon MWAA disposes of the additional web servers, and scales down to the number set in <code>MinxWebserers</code>.
388+
* </p>
389+
* <p>Valid values: Accepts between <code>2</code> and <code>5</code>. Defaults to <code>2</code>.</p>
390+
* @public
391+
*/
392+
MaxWebservers?: number;
366393
}
367394

368395
/**
@@ -742,7 +769,7 @@ export interface Environment {
742769

743770
/**
744771
* <p>The Apache Airflow version on your environment.</p>
745-
* <p>Valid values: <code>1.10.12</code>, <code>2.0.2</code>, <code>2.2.2</code>, <code>2.4.3</code>, <code>2.5.1</code>, <code>2.6.3</code>, <code>2.7.2</code>.</p>
772+
* <p>Valid values: <code>1.10.12</code>, <code>2.0.2</code>, <code>2.2.2</code>, <code>2.4.3</code>, <code>2.5.1</code>, <code>2.6.3</code>, <code>2.7.2</code>, <code>2.8.1</code>.</p>
746773
* @public
747774
*/
748775
AirflowVersion?: string;
@@ -833,7 +860,7 @@ export interface Environment {
833860
AirflowConfigurationOptions?: Record<string, string>;
834861

835862
/**
836-
* <p>The environment class type. Valid values: <code>mw1.small</code>, <code>mw1.medium</code>, <code>mw1.large</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/environment-class.html">Amazon MWAA environment class</a>.</p>
863+
* <p>The environment class type. Valid values: <code>mw1.small</code>, <code>mw1.medium</code>, <code>mw1.large</code>, <code>mw1.xlarge</code>, and <code>mw1.2xlarge</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/environment-class.html">Amazon MWAA environment class</a>.</p>
837864
* @public
838865
*/
839866
EnvironmentClass?: string;
@@ -917,6 +944,33 @@ export interface Environment {
917944
* @public
918945
*/
919946
EndpointManagement?: EndpointManagement;
947+
948+
/**
949+
* <p>
950+
* The minimum number of web servers that you want to run in your environment.
951+
* Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for <code>MaxWebservers</code>
952+
* when you interact with your Apache Airflow environment using Apache Airflow REST API, or
953+
* the Apache Airflow CLI. As the transaction-per-second rate, and the network load, decrease,
954+
* Amazon MWAA disposes of the additional web servers, and scales down to the number set in <code>MinxWebserers</code>.
955+
* </p>
956+
* <p>Valid values: Accepts between <code>2</code> and <code>5</code>. Defaults to <code>2</code>.</p>
957+
* @public
958+
*/
959+
MinWebservers?: number;
960+
961+
/**
962+
* <p>
963+
* The maximum number of web servers that you want to run in your environment.
964+
* Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for <code>MaxWebservers</code>
965+
* when you interact with your Apache Airflow environment using Apache Airflow REST API, or
966+
* the Apache Airflow CLI. For example, in scenarios where your workload requires network calls to the Apache Airflow REST API with a high transaction-per-second (TPS)
967+
* rate, Amazon MWAA will increase the number of web servers up to the number set in <code>MaxWebserers</code>. As TPS rates decrease
968+
* Amazon MWAA disposes of the additional web servers, and scales down to the number set in <code>MinxWebserers</code>.
969+
* </p>
970+
* <p>Valid values: Accepts between <code>2</code> and <code>5</code>. Defaults to <code>2</code>.</p>
971+
* @public
972+
*/
973+
MaxWebservers?: number;
920974
}
921975

922976
/**
@@ -1242,7 +1296,7 @@ export interface UpdateEnvironmentInput {
12421296
* <p>The Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA.</p>
12431297
* <p>Before you upgrade an environment, make sure your requirements, DAGs, plugins, and other resources used in your workflows are compatible with the new Apache Airflow version. For more information about updating
12441298
* your resources, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/upgrading-environment.html">Upgrading an Amazon MWAA environment</a>.</p>
1245-
* <p>Valid values: <code>1.10.12</code>, <code>2.0.2</code>, <code>2.2.2</code>, <code>2.4.3</code>, <code>2.5.1</code>, <code>2.6.3</code>, <code>2.7.2</code>.</p>
1299+
* <p>Valid values: <code>1.10.12</code>, <code>2.0.2</code>, <code>2.2.2</code>, <code>2.4.3</code>, <code>2.5.1</code>, <code>2.6.3</code>, <code>2.7.2</code>, <code>2.8.1</code>.</p>
12461300
* @public
12471301
*/
12481302
AirflowVersion?: string;
@@ -1319,7 +1373,7 @@ export interface UpdateEnvironmentInput {
13191373
AirflowConfigurationOptions?: Record<string, string>;
13201374

13211375
/**
1322-
* <p>The environment class type. Valid values: <code>mw1.small</code>, <code>mw1.medium</code>, <code>mw1.large</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/environment-class.html">Amazon MWAA environment class</a>.</p>
1376+
* <p>The environment class type. Valid values: <code>mw1.small</code>, <code>mw1.medium</code>, <code>mw1.large</code>, <code>mw1.xlarge</code>, and <code>mw1.2xlarge</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/environment-class.html">Amazon MWAA environment class</a>.</p>
13231377
* @public
13241378
*/
13251379
EnvironmentClass?: string;
@@ -1365,6 +1419,33 @@ export interface UpdateEnvironmentInput {
13651419
* @public
13661420
*/
13671421
Schedulers?: number;
1422+
1423+
/**
1424+
* <p>
1425+
* The minimum number of web servers that you want to run in your environment.
1426+
* Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for <code>MaxWebservers</code>
1427+
* when you interact with your Apache Airflow environment using Apache Airflow REST API, or
1428+
* the Apache Airflow CLI. As the transaction-per-second rate, and the network load, decrease,
1429+
* Amazon MWAA disposes of the additional web servers, and scales down to the number set in <code>MinxWebserers</code>.
1430+
* </p>
1431+
* <p>Valid values: Accepts between <code>2</code> and <code>5</code>. Defaults to <code>2</code>.</p>
1432+
* @public
1433+
*/
1434+
MinWebservers?: number;
1435+
1436+
/**
1437+
* <p>
1438+
* The maximum number of web servers that you want to run in your environment.
1439+
* Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for <code>MaxWebservers</code>
1440+
* when you interact with your Apache Airflow environment using Apache Airflow REST API, or
1441+
* the Apache Airflow CLI. For example, in scenarios where your workload requires network calls to the Apache Airflow REST API with a high transaction-per-second (TPS)
1442+
* rate, Amazon MWAA will increase the number of web servers up to the number set in <code>MaxWebserers</code>. As TPS rates decrease
1443+
* Amazon MWAA disposes of the additional web servers, and scales down to the number set in <code>MinxWebserers</code>.
1444+
* </p>
1445+
* <p>Valid values: Accepts between <code>2</code> and <code>5</code>. Defaults to <code>2</code>.</p>
1446+
* @public
1447+
*/
1448+
MaxWebservers?: number;
13681449
}
13691450

13701451
/**

clients/client-mwaa/src/protocols/Aws_restJson1.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ export const se_CreateEnvironmentCommand = async (
111111
ExecutionRoleArn: [],
112112
KmsKey: [],
113113
LoggingConfiguration: (_) => _json(_),
114+
MaxWebservers: [],
114115
MaxWorkers: [],
116+
MinWebservers: [],
115117
MinWorkers: [],
116118
NetworkConfiguration: (_) => _json(_),
117119
PluginsS3ObjectVersion: [],
@@ -376,7 +378,9 @@ export const se_UpdateEnvironmentCommand = async (
376378
EnvironmentClass: [],
377379
ExecutionRoleArn: [],
378380
LoggingConfiguration: (_) => _json(_),
381+
MaxWebservers: [],
379382
MaxWorkers: [],
383+
MinWebservers: [],
380384
MinWorkers: [],
381385
NetworkConfiguration: (_) => _json(_),
382386
PluginsS3ObjectVersion: [],
@@ -810,7 +814,9 @@ const de_Environment = (output: any, context: __SerdeContext): Environment => {
810814
KmsKey: __expectString,
811815
LastUpdate: (_: any) => de_LastUpdate(_, context),
812816
LoggingConfiguration: _json,
817+
MaxWebservers: __expectInt32,
813818
MaxWorkers: __expectInt32,
819+
MinWebservers: __expectInt32,
814820
MinWorkers: __expectInt32,
815821
Name: __expectString,
816822
NetworkConfiguration: _json,

0 commit comments

Comments
 (0)