Skip to content

Commit

Permalink
feat(client-lambda): Adds support for increased ephemeral storage (/t…
Browse files Browse the repository at this point in the history
…mp) 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.
  • Loading branch information
awstools committed Mar 24, 2022
1 parent da33251 commit d77b86b
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
34 changes: 34 additions & 0 deletions clients/client-lambda/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1385,6 +1385,25 @@ export namespace Environment {
});
}

/**
* <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>
*/
export interface EphemeralStorage {
/**
* <p>The size of the function’s /tmp directory.</p>
*/
Size: number | undefined;
}

export namespace EphemeralStorage {
/**
* @internal
*/
export const filterSensitiveLog = (obj: EphemeralStorage): any => ({
...obj,
});
}

/**
* <p>Details about the connection between a Lambda function and an
* <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html">Amazon EFS file system</a>.</p>
Expand Down Expand Up @@ -1664,6 +1683,11 @@ export interface CreateFunctionRequest {
* The default value is <code>x86_64</code>.</p>
*/
Architectures?: (Architecture | string)[];

/**
* <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>
*/
EphemeralStorage?: EphemeralStorage;
}

export namespace CreateFunctionRequest {
Expand Down Expand Up @@ -2073,6 +2097,11 @@ export interface FunctionConfiguration {
* valid values. The default architecture value is <code>x86_64</code>.</p>
*/
Architectures?: (Architecture | string)[];

/**
* <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>
*/
EphemeralStorage?: EphemeralStorage;
}

export namespace FunctionConfiguration {
Expand Down Expand Up @@ -5821,6 +5850,11 @@ export interface UpdateFunctionConfigurationRequest {
* values</a> that override the values in the container image Docker file.</p>
*/
ImageConfig?: ImageConfig;

/**
* <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>
*/
EphemeralStorage?: EphemeralStorage;
}

export namespace UpdateFunctionConfigurationRequest {
Expand Down
45 changes: 45 additions & 0 deletions clients/client-lambda/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ import {
Environment,
EnvironmentError,
EnvironmentResponse,
EphemeralStorage,
EventSourceMappingConfiguration,
FileSystemConfig,
Filter,
Expand Down Expand Up @@ -536,6 +537,10 @@ export const serializeAws_restJson1CreateFunctionCommand = async (
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
...(input.Environment !== undefined &&
input.Environment !== null && { Environment: serializeAws_restJson1Environment(input.Environment, context) }),
...(input.EphemeralStorage !== undefined &&
input.EphemeralStorage !== null && {
EphemeralStorage: serializeAws_restJson1EphemeralStorage(input.EphemeralStorage, context),
}),
...(input.FileSystemConfigs !== undefined &&
input.FileSystemConfigs !== null && {
FileSystemConfigs: serializeAws_restJson1FileSystemConfigList(input.FileSystemConfigs, context),
Expand Down Expand Up @@ -2390,6 +2395,10 @@ export const serializeAws_restJson1UpdateFunctionConfigurationCommand = async (
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
...(input.Environment !== undefined &&
input.Environment !== null && { Environment: serializeAws_restJson1Environment(input.Environment, context) }),
...(input.EphemeralStorage !== undefined &&
input.EphemeralStorage !== null && {
EphemeralStorage: serializeAws_restJson1EphemeralStorage(input.EphemeralStorage, context),
}),
...(input.FileSystemConfigs !== undefined &&
input.FileSystemConfigs !== null && {
FileSystemConfigs: serializeAws_restJson1FileSystemConfigList(input.FileSystemConfigs, context),
Expand Down Expand Up @@ -2890,6 +2899,7 @@ export const deserializeAws_restJson1CreateFunctionCommand = async (
DeadLetterConfig: undefined,
Description: undefined,
Environment: undefined,
EphemeralStorage: undefined,
FileSystemConfigs: undefined,
FunctionArn: undefined,
FunctionName: undefined,
Expand Down Expand Up @@ -2936,6 +2946,9 @@ export const deserializeAws_restJson1CreateFunctionCommand = async (
if (data.Environment !== undefined && data.Environment !== null) {
contents.Environment = deserializeAws_restJson1EnvironmentResponse(data.Environment, context);
}
if (data.EphemeralStorage !== undefined && data.EphemeralStorage !== null) {
contents.EphemeralStorage = deserializeAws_restJson1EphemeralStorage(data.EphemeralStorage, context);
}
if (data.FileSystemConfigs !== undefined && data.FileSystemConfigs !== null) {
contents.FileSystemConfigs = deserializeAws_restJson1FileSystemConfigList(data.FileSystemConfigs, context);
}
Expand Down Expand Up @@ -4142,6 +4155,7 @@ export const deserializeAws_restJson1GetFunctionConfigurationCommand = async (
DeadLetterConfig: undefined,
Description: undefined,
Environment: undefined,
EphemeralStorage: undefined,
FileSystemConfigs: undefined,
FunctionArn: undefined,
FunctionName: undefined,
Expand Down Expand Up @@ -4188,6 +4202,9 @@ export const deserializeAws_restJson1GetFunctionConfigurationCommand = async (
if (data.Environment !== undefined && data.Environment !== null) {
contents.Environment = deserializeAws_restJson1EnvironmentResponse(data.Environment, context);
}
if (data.EphemeralStorage !== undefined && data.EphemeralStorage !== null) {
contents.EphemeralStorage = deserializeAws_restJson1EphemeralStorage(data.EphemeralStorage, context);
}
if (data.FileSystemConfigs !== undefined && data.FileSystemConfigs !== null) {
contents.FileSystemConfigs = deserializeAws_restJson1FileSystemConfigList(data.FileSystemConfigs, context);
}
Expand Down Expand Up @@ -5657,6 +5674,7 @@ export const deserializeAws_restJson1PublishVersionCommand = async (
DeadLetterConfig: undefined,
Description: undefined,
Environment: undefined,
EphemeralStorage: undefined,
FileSystemConfigs: undefined,
FunctionArn: undefined,
FunctionName: undefined,
Expand Down Expand Up @@ -5703,6 +5721,9 @@ export const deserializeAws_restJson1PublishVersionCommand = async (
if (data.Environment !== undefined && data.Environment !== null) {
contents.Environment = deserializeAws_restJson1EnvironmentResponse(data.Environment, context);
}
if (data.EphemeralStorage !== undefined && data.EphemeralStorage !== null) {
contents.EphemeralStorage = deserializeAws_restJson1EphemeralStorage(data.EphemeralStorage, context);
}
if (data.FileSystemConfigs !== undefined && data.FileSystemConfigs !== null) {
contents.FileSystemConfigs = deserializeAws_restJson1FileSystemConfigList(data.FileSystemConfigs, context);
}
Expand Down Expand Up @@ -6614,6 +6635,7 @@ export const deserializeAws_restJson1UpdateFunctionCodeCommand = async (
DeadLetterConfig: undefined,
Description: undefined,
Environment: undefined,
EphemeralStorage: undefined,
FileSystemConfigs: undefined,
FunctionArn: undefined,
FunctionName: undefined,
Expand Down Expand Up @@ -6660,6 +6682,9 @@ export const deserializeAws_restJson1UpdateFunctionCodeCommand = async (
if (data.Environment !== undefined && data.Environment !== null) {
contents.Environment = deserializeAws_restJson1EnvironmentResponse(data.Environment, context);
}
if (data.EphemeralStorage !== undefined && data.EphemeralStorage !== null) {
contents.EphemeralStorage = deserializeAws_restJson1EphemeralStorage(data.EphemeralStorage, context);
}
if (data.FileSystemConfigs !== undefined && data.FileSystemConfigs !== null) {
contents.FileSystemConfigs = deserializeAws_restJson1FileSystemConfigList(data.FileSystemConfigs, context);
}
Expand Down Expand Up @@ -6809,6 +6834,7 @@ export const deserializeAws_restJson1UpdateFunctionConfigurationCommand = async
DeadLetterConfig: undefined,
Description: undefined,
Environment: undefined,
EphemeralStorage: undefined,
FileSystemConfigs: undefined,
FunctionArn: undefined,
FunctionName: undefined,
Expand Down Expand Up @@ -6855,6 +6881,9 @@ export const deserializeAws_restJson1UpdateFunctionConfigurationCommand = async
if (data.Environment !== undefined && data.Environment !== null) {
contents.Environment = deserializeAws_restJson1EnvironmentResponse(data.Environment, context);
}
if (data.EphemeralStorage !== undefined && data.EphemeralStorage !== null) {
contents.EphemeralStorage = deserializeAws_restJson1EphemeralStorage(data.EphemeralStorage, context);
}
if (data.FileSystemConfigs !== undefined && data.FileSystemConfigs !== null) {
contents.FileSystemConfigs = deserializeAws_restJson1FileSystemConfigList(data.FileSystemConfigs, context);
}
Expand Down Expand Up @@ -7857,6 +7886,12 @@ const serializeAws_restJson1EnvironmentVariables = (input: { [key: string]: stri
}, {});
};

const serializeAws_restJson1EphemeralStorage = (input: EphemeralStorage, context: __SerdeContext): any => {
return {
...(input.Size !== undefined && input.Size !== null && { Size: input.Size }),
};
};

const serializeAws_restJson1FileSystemConfig = (input: FileSystemConfig, context: __SerdeContext): any => {
return {
...(input.Arn !== undefined && input.Arn !== null && { Arn: input.Arn }),
Expand Down Expand Up @@ -8338,6 +8373,12 @@ const deserializeAws_restJson1EnvironmentVariables = (
}, {});
};

const deserializeAws_restJson1EphemeralStorage = (output: any, context: __SerdeContext): EphemeralStorage => {
return {
Size: __expectInt32(output.Size),
} as any;
};

const deserializeAws_restJson1EventSourceMappingConfiguration = (
output: any,
context: __SerdeContext
Expand Down Expand Up @@ -8495,6 +8536,10 @@ const deserializeAws_restJson1FunctionConfiguration = (output: any, context: __S
output.Environment !== undefined && output.Environment !== null
? deserializeAws_restJson1EnvironmentResponse(output.Environment, context)
: undefined,
EphemeralStorage:
output.EphemeralStorage !== undefined && output.EphemeralStorage !== null
? deserializeAws_restJson1EphemeralStorage(output.EphemeralStorage, context)
: undefined,
FileSystemConfigs:
output.FileSystemConfigs !== undefined && output.FileSystemConfigs !== null
? deserializeAws_restJson1FileSystemConfigList(output.FileSystemConfigs, context)
Expand Down

0 comments on commit d77b86b

Please sign in to comment.