Skip to content

Commit d77b86b

Browse files
author
awstools
committed
feat(client-lambda): Adds support for increased ephemeral storage (/tmp) up to 10GB for Lambda functions. Customers can now provision up to 10 GB of ephemeral storage per function instance, a 20x increase over the previous limit of 512 MB.
1 parent da33251 commit d77b86b

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed

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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,6 +1385,25 @@ export namespace Environment {
13851385
});
13861386
}
13871387

1388+
/**
1389+
* <p>The size of the function’s /tmp directory in MB. The default value is 512, but can be any whole number between 512 and 10240 MB.</p>
1390+
*/
1391+
export interface EphemeralStorage {
1392+
/**
1393+
* <p>The size of the function’s /tmp directory.</p>
1394+
*/
1395+
Size: number | undefined;
1396+
}
1397+
1398+
export namespace EphemeralStorage {
1399+
/**
1400+
* @internal
1401+
*/
1402+
export const filterSensitiveLog = (obj: EphemeralStorage): any => ({
1403+
...obj,
1404+
});
1405+
}
1406+
13881407
/**
13891408
* <p>Details about the connection between a Lambda function and an
13901409
* <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html">Amazon EFS file system</a>.</p>
@@ -1664,6 +1683,11 @@ export interface CreateFunctionRequest {
16641683
* The default value is <code>x86_64</code>.</p>
16651684
*/
16661685
Architectures?: (Architecture | string)[];
1686+
1687+
/**
1688+
* <p>The size of the function’s /tmp directory in MB. The default value is 512, but can be any whole number between 512 and 10240 MB.</p>
1689+
*/
1690+
EphemeralStorage?: EphemeralStorage;
16671691
}
16681692

16691693
export namespace CreateFunctionRequest {
@@ -2073,6 +2097,11 @@ export interface FunctionConfiguration {
20732097
* valid values. The default architecture value is <code>x86_64</code>.</p>
20742098
*/
20752099
Architectures?: (Architecture | string)[];
2100+
2101+
/**
2102+
* <p>The size of the function’s /tmp directory in MB. The default value is 512, but can be any whole number between 512 and 10240 MB.</p>
2103+
*/
2104+
EphemeralStorage?: EphemeralStorage;
20762105
}
20772106

20782107
export namespace FunctionConfiguration {
@@ -5821,6 +5850,11 @@ export interface UpdateFunctionConfigurationRequest {
58215850
* values</a> that override the values in the container image Docker file.</p>
58225851
*/
58235852
ImageConfig?: ImageConfig;
5853+
5854+
/**
5855+
* <p>The size of the function’s /tmp directory in MB. The default value is 512, but can be any whole number between 512 and 10240 MB.</p>
5856+
*/
5857+
EphemeralStorage?: EphemeralStorage;
58245858
}
58255859

58265860
export namespace UpdateFunctionConfigurationRequest {

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

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ import {
207207
Environment,
208208
EnvironmentError,
209209
EnvironmentResponse,
210+
EphemeralStorage,
210211
EventSourceMappingConfiguration,
211212
FileSystemConfig,
212213
Filter,
@@ -536,6 +537,10 @@ export const serializeAws_restJson1CreateFunctionCommand = async (
536537
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
537538
...(input.Environment !== undefined &&
538539
input.Environment !== null && { Environment: serializeAws_restJson1Environment(input.Environment, context) }),
540+
...(input.EphemeralStorage !== undefined &&
541+
input.EphemeralStorage !== null && {
542+
EphemeralStorage: serializeAws_restJson1EphemeralStorage(input.EphemeralStorage, context),
543+
}),
539544
...(input.FileSystemConfigs !== undefined &&
540545
input.FileSystemConfigs !== null && {
541546
FileSystemConfigs: serializeAws_restJson1FileSystemConfigList(input.FileSystemConfigs, context),
@@ -2390,6 +2395,10 @@ export const serializeAws_restJson1UpdateFunctionConfigurationCommand = async (
23902395
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
23912396
...(input.Environment !== undefined &&
23922397
input.Environment !== null && { Environment: serializeAws_restJson1Environment(input.Environment, context) }),
2398+
...(input.EphemeralStorage !== undefined &&
2399+
input.EphemeralStorage !== null && {
2400+
EphemeralStorage: serializeAws_restJson1EphemeralStorage(input.EphemeralStorage, context),
2401+
}),
23932402
...(input.FileSystemConfigs !== undefined &&
23942403
input.FileSystemConfigs !== null && {
23952404
FileSystemConfigs: serializeAws_restJson1FileSystemConfigList(input.FileSystemConfigs, context),
@@ -2890,6 +2899,7 @@ export const deserializeAws_restJson1CreateFunctionCommand = async (
28902899
DeadLetterConfig: undefined,
28912900
Description: undefined,
28922901
Environment: undefined,
2902+
EphemeralStorage: undefined,
28932903
FileSystemConfigs: undefined,
28942904
FunctionArn: undefined,
28952905
FunctionName: undefined,
@@ -2936,6 +2946,9 @@ export const deserializeAws_restJson1CreateFunctionCommand = async (
29362946
if (data.Environment !== undefined && data.Environment !== null) {
29372947
contents.Environment = deserializeAws_restJson1EnvironmentResponse(data.Environment, context);
29382948
}
2949+
if (data.EphemeralStorage !== undefined && data.EphemeralStorage !== null) {
2950+
contents.EphemeralStorage = deserializeAws_restJson1EphemeralStorage(data.EphemeralStorage, context);
2951+
}
29392952
if (data.FileSystemConfigs !== undefined && data.FileSystemConfigs !== null) {
29402953
contents.FileSystemConfigs = deserializeAws_restJson1FileSystemConfigList(data.FileSystemConfigs, context);
29412954
}
@@ -4142,6 +4155,7 @@ export const deserializeAws_restJson1GetFunctionConfigurationCommand = async (
41424155
DeadLetterConfig: undefined,
41434156
Description: undefined,
41444157
Environment: undefined,
4158+
EphemeralStorage: undefined,
41454159
FileSystemConfigs: undefined,
41464160
FunctionArn: undefined,
41474161
FunctionName: undefined,
@@ -4188,6 +4202,9 @@ export const deserializeAws_restJson1GetFunctionConfigurationCommand = async (
41884202
if (data.Environment !== undefined && data.Environment !== null) {
41894203
contents.Environment = deserializeAws_restJson1EnvironmentResponse(data.Environment, context);
41904204
}
4205+
if (data.EphemeralStorage !== undefined && data.EphemeralStorage !== null) {
4206+
contents.EphemeralStorage = deserializeAws_restJson1EphemeralStorage(data.EphemeralStorage, context);
4207+
}
41914208
if (data.FileSystemConfigs !== undefined && data.FileSystemConfigs !== null) {
41924209
contents.FileSystemConfigs = deserializeAws_restJson1FileSystemConfigList(data.FileSystemConfigs, context);
41934210
}
@@ -5657,6 +5674,7 @@ export const deserializeAws_restJson1PublishVersionCommand = async (
56575674
DeadLetterConfig: undefined,
56585675
Description: undefined,
56595676
Environment: undefined,
5677+
EphemeralStorage: undefined,
56605678
FileSystemConfigs: undefined,
56615679
FunctionArn: undefined,
56625680
FunctionName: undefined,
@@ -5703,6 +5721,9 @@ export const deserializeAws_restJson1PublishVersionCommand = async (
57035721
if (data.Environment !== undefined && data.Environment !== null) {
57045722
contents.Environment = deserializeAws_restJson1EnvironmentResponse(data.Environment, context);
57055723
}
5724+
if (data.EphemeralStorage !== undefined && data.EphemeralStorage !== null) {
5725+
contents.EphemeralStorage = deserializeAws_restJson1EphemeralStorage(data.EphemeralStorage, context);
5726+
}
57065727
if (data.FileSystemConfigs !== undefined && data.FileSystemConfigs !== null) {
57075728
contents.FileSystemConfigs = deserializeAws_restJson1FileSystemConfigList(data.FileSystemConfigs, context);
57085729
}
@@ -6614,6 +6635,7 @@ export const deserializeAws_restJson1UpdateFunctionCodeCommand = async (
66146635
DeadLetterConfig: undefined,
66156636
Description: undefined,
66166637
Environment: undefined,
6638+
EphemeralStorage: undefined,
66176639
FileSystemConfigs: undefined,
66186640
FunctionArn: undefined,
66196641
FunctionName: undefined,
@@ -6660,6 +6682,9 @@ export const deserializeAws_restJson1UpdateFunctionCodeCommand = async (
66606682
if (data.Environment !== undefined && data.Environment !== null) {
66616683
contents.Environment = deserializeAws_restJson1EnvironmentResponse(data.Environment, context);
66626684
}
6685+
if (data.EphemeralStorage !== undefined && data.EphemeralStorage !== null) {
6686+
contents.EphemeralStorage = deserializeAws_restJson1EphemeralStorage(data.EphemeralStorage, context);
6687+
}
66636688
if (data.FileSystemConfigs !== undefined && data.FileSystemConfigs !== null) {
66646689
contents.FileSystemConfigs = deserializeAws_restJson1FileSystemConfigList(data.FileSystemConfigs, context);
66656690
}
@@ -6809,6 +6834,7 @@ export const deserializeAws_restJson1UpdateFunctionConfigurationCommand = async
68096834
DeadLetterConfig: undefined,
68106835
Description: undefined,
68116836
Environment: undefined,
6837+
EphemeralStorage: undefined,
68126838
FileSystemConfigs: undefined,
68136839
FunctionArn: undefined,
68146840
FunctionName: undefined,
@@ -6855,6 +6881,9 @@ export const deserializeAws_restJson1UpdateFunctionConfigurationCommand = async
68556881
if (data.Environment !== undefined && data.Environment !== null) {
68566882
contents.Environment = deserializeAws_restJson1EnvironmentResponse(data.Environment, context);
68576883
}
6884+
if (data.EphemeralStorage !== undefined && data.EphemeralStorage !== null) {
6885+
contents.EphemeralStorage = deserializeAws_restJson1EphemeralStorage(data.EphemeralStorage, context);
6886+
}
68586887
if (data.FileSystemConfigs !== undefined && data.FileSystemConfigs !== null) {
68596888
contents.FileSystemConfigs = deserializeAws_restJson1FileSystemConfigList(data.FileSystemConfigs, context);
68606889
}
@@ -7857,6 +7886,12 @@ const serializeAws_restJson1EnvironmentVariables = (input: { [key: string]: stri
78577886
}, {});
78587887
};
78597888

7889+
const serializeAws_restJson1EphemeralStorage = (input: EphemeralStorage, context: __SerdeContext): any => {
7890+
return {
7891+
...(input.Size !== undefined && input.Size !== null && { Size: input.Size }),
7892+
};
7893+
};
7894+
78607895
const serializeAws_restJson1FileSystemConfig = (input: FileSystemConfig, context: __SerdeContext): any => {
78617896
return {
78627897
...(input.Arn !== undefined && input.Arn !== null && { Arn: input.Arn }),
@@ -8338,6 +8373,12 @@ const deserializeAws_restJson1EnvironmentVariables = (
83388373
}, {});
83398374
};
83408375

8376+
const deserializeAws_restJson1EphemeralStorage = (output: any, context: __SerdeContext): EphemeralStorage => {
8377+
return {
8378+
Size: __expectInt32(output.Size),
8379+
} as any;
8380+
};
8381+
83418382
const deserializeAws_restJson1EventSourceMappingConfiguration = (
83428383
output: any,
83438384
context: __SerdeContext
@@ -8495,6 +8536,10 @@ const deserializeAws_restJson1FunctionConfiguration = (output: any, context: __S
84958536
output.Environment !== undefined && output.Environment !== null
84968537
? deserializeAws_restJson1EnvironmentResponse(output.Environment, context)
84978538
: undefined,
8539+
EphemeralStorage:
8540+
output.EphemeralStorage !== undefined && output.EphemeralStorage !== null
8541+
? deserializeAws_restJson1EphemeralStorage(output.EphemeralStorage, context)
8542+
: undefined,
84988543
FileSystemConfigs:
84998544
output.FileSystemConfigs !== undefined && output.FileSystemConfigs !== null
85008545
? deserializeAws_restJson1FileSystemConfigList(output.FileSystemConfigs, context)

0 commit comments

Comments
 (0)