Skip to content

Commit 4e40cc0

Browse files
author
awstools
committed
feat(client-lambda): Launching Lambda integration with S3 Files as a new file system configuration.
1 parent 4f5a452 commit 4e40cc0

8 files changed

Lines changed: 254 additions & 14 deletions

File tree

clients/client-lambda/src/commands/InvokeCommand.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,15 @@ export interface InvokeCommandOutput extends InvokeCommandOutputType, __Metadata
155155
* @throws {@link ResourceNotReadyException} (server fault)
156156
* <p>The function is inactive and its VPC connection is no longer available. Wait for the VPC connection to reestablish and try again.</p>
157157
*
158+
* @throws {@link S3FilesMountConnectivityException} (client fault)
159+
* <p>The Lambda function couldn't make a network connection to the configured S3 Files access point.</p>
160+
*
161+
* @throws {@link S3FilesMountFailureException} (client fault)
162+
* <p>The Lambda function couldn't mount the configured S3 Files access point due to a permission or configuration issue.</p>
163+
*
164+
* @throws {@link S3FilesMountTimeoutException} (client fault)
165+
* <p>The Lambda function made a network connection to the configured S3 Files access point, but the mount operation timed out.</p>
166+
*
158167
* @throws {@link SerializedRequestEntityTooLargeException} (client fault)
159168
* <p>The request payload exceeded the maximum allowed size for serialized request entities.</p>
160169
*

clients/client-lambda/src/commands/InvokeWithResponseStreamCommand.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,15 @@ export interface InvokeWithResponseStreamCommandOutput extends InvokeWithRespons
150150
* @throws {@link ResourceNotReadyException} (server fault)
151151
* <p>The function is inactive and its VPC connection is no longer available. Wait for the VPC connection to reestablish and try again.</p>
152152
*
153+
* @throws {@link S3FilesMountConnectivityException} (client fault)
154+
* <p>The Lambda function couldn't make a network connection to the configured S3 Files access point.</p>
155+
*
156+
* @throws {@link S3FilesMountFailureException} (client fault)
157+
* <p>The Lambda function couldn't mount the configured S3 Files access point due to a permission or configuration issue.</p>
158+
*
159+
* @throws {@link S3FilesMountTimeoutException} (client fault)
160+
* <p>The Lambda function made a network connection to the configured S3 Files access point, but the mount operation timed out.</p>
161+
*
153162
* @throws {@link SerializedRequestEntityTooLargeException} (client fault)
154163
* <p>The request payload exceeded the maximum allowed size for serialized request entities.</p>
155164
*

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

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,105 @@ export class ResourceNotReadyException extends __BaseException {
916916
}
917917
}
918918

919+
/**
920+
* <p>The Lambda function couldn't make a network connection to the configured S3 Files access point.</p>
921+
* @public
922+
*/
923+
export class S3FilesMountConnectivityException extends __BaseException {
924+
readonly name = "S3FilesMountConnectivityException" as const;
925+
readonly $fault = "client" as const;
926+
/**
927+
* <p>The exception type.</p>
928+
* @public
929+
*/
930+
Type?: string | undefined;
931+
932+
/**
933+
* <p>The exception message.</p>
934+
* @public
935+
*/
936+
Message?: string | undefined;
937+
/**
938+
* @internal
939+
*/
940+
constructor(opts: __ExceptionOptionType<S3FilesMountConnectivityException, __BaseException>) {
941+
super({
942+
name: "S3FilesMountConnectivityException",
943+
$fault: "client",
944+
...opts,
945+
});
946+
Object.setPrototypeOf(this, S3FilesMountConnectivityException.prototype);
947+
this.Type = opts.Type;
948+
this.Message = opts.Message;
949+
}
950+
}
951+
952+
/**
953+
* <p>The Lambda function couldn't mount the configured S3 Files access point due to a permission or configuration issue.</p>
954+
* @public
955+
*/
956+
export class S3FilesMountFailureException extends __BaseException {
957+
readonly name = "S3FilesMountFailureException" as const;
958+
readonly $fault = "client" as const;
959+
/**
960+
* <p>The exception type.</p>
961+
* @public
962+
*/
963+
Type?: string | undefined;
964+
965+
/**
966+
* <p>The exception message.</p>
967+
* @public
968+
*/
969+
Message?: string | undefined;
970+
/**
971+
* @internal
972+
*/
973+
constructor(opts: __ExceptionOptionType<S3FilesMountFailureException, __BaseException>) {
974+
super({
975+
name: "S3FilesMountFailureException",
976+
$fault: "client",
977+
...opts,
978+
});
979+
Object.setPrototypeOf(this, S3FilesMountFailureException.prototype);
980+
this.Type = opts.Type;
981+
this.Message = opts.Message;
982+
}
983+
}
984+
985+
/**
986+
* <p>The Lambda function made a network connection to the configured S3 Files access point, but the mount operation timed out.</p>
987+
* @public
988+
*/
989+
export class S3FilesMountTimeoutException extends __BaseException {
990+
readonly name = "S3FilesMountTimeoutException" as const;
991+
readonly $fault = "client" as const;
992+
/**
993+
* <p>The exception type.</p>
994+
* @public
995+
*/
996+
Type?: string | undefined;
997+
998+
/**
999+
* <p>The exception message.</p>
1000+
* @public
1001+
*/
1002+
Message?: string | undefined;
1003+
/**
1004+
* @internal
1005+
*/
1006+
constructor(opts: __ExceptionOptionType<S3FilesMountTimeoutException, __BaseException>) {
1007+
super({
1008+
name: "S3FilesMountTimeoutException",
1009+
$fault: "client",
1010+
...opts,
1011+
});
1012+
Object.setPrototypeOf(this, S3FilesMountTimeoutException.prototype);
1013+
this.Type = opts.Type;
1014+
this.Message = opts.Message;
1015+
}
1016+
}
1017+
9191018
/**
9201019
* <p>The request payload exceeded the maximum allowed size for serialized request entities.</p>
9211020
* @public

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2464,12 +2464,12 @@ export interface EphemeralStorage {
24642464
}
24652465

24662466
/**
2467-
* <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>
2467+
* <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> or an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html">Amazon S3 Files file system</a>.</p>
24682468
* @public
24692469
*/
24702470
export interface FileSystemConfig {
24712471
/**
2472-
* <p>The Amazon Resource Name (ARN) of the Amazon EFS access point that provides access to the file system.</p>
2472+
* <p>The Amazon Resource Name (ARN) of the Amazon EFS or Amazon S3 Files access point that provides access to the file system.</p>
24732473
* @public
24742474
*/
24752475
Arn: string | undefined;
@@ -2702,7 +2702,7 @@ export interface CreateFunctionRequest {
27022702
Layers?: string[] | undefined;
27032703

27042704
/**
2705-
* <p>Connection settings for an Amazon EFS file system.</p>
2705+
* <p>Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.</p>
27062706
* @public
27072707
*/
27082708
FileSystemConfigs?: FileSystemConfig[] | undefined;
@@ -3128,7 +3128,7 @@ export interface FunctionConfiguration {
31283128
LastUpdateStatusReasonCode?: LastUpdateStatusReasonCode | undefined;
31293129

31303130
/**
3131-
* <p>Connection settings for an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html">Amazon EFS file system</a>.</p>
3131+
* <p>Connection settings for an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html">Amazon EFS file system</a> or an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html">Amazon S3 Files file system</a>.</p>
31323132
* @public
31333133
*/
31343134
FileSystemConfigs?: FileSystemConfig[] | undefined;
@@ -4616,7 +4616,7 @@ export interface UpdateFunctionConfigurationRequest {
46164616
Layers?: string[] | undefined;
46174617

46184618
/**
4619-
* <p>Connection settings for an Amazon EFS file system.</p>
4619+
* <p>Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.</p>
46204620
* @public
46214621
*/
46224622
FileSystemConfigs?: FileSystemConfig[] | undefined;
@@ -6378,7 +6378,7 @@ export interface ListDurableExecutionsByFunctionRequest {
63786378
Qualifier?: string | undefined;
63796379

63806380
/**
6381-
* <p>Filter executions by name. Only executions with names that contain this string are returned.</p>
6381+
* <p>Filter executions by name. Only executions with names that matches this string are returned.</p>
63826382
* @public
63836383
*/
63846384
DurableExecutionName?: string | undefined;

clients/client-lambda/src/schemas/schemas_0.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,9 @@ const _SDERt = "StopDurableExecutionResponse";
579579
const _SE = "ServiceException";
580580
const _SET = "ScheduledEndTimestamp";
581581
const _SFD = "StepFailedDetails";
582+
const _SFMCE = "S3FilesMountConnectivityException";
583+
const _SFMFE = "S3FilesMountFailureException";
584+
const _SFMTE = "S3FilesMountTimeoutException";
582585
const _SGI = "SecurityGroupIds";
583586
const _SI = "StatementId";
584587
const _SIPALRE = "SubnetIPAddressLimitReachedException";
@@ -762,6 +765,9 @@ import {
762765
ResourceInUseException,
763766
ResourceNotFoundException,
764767
ResourceNotReadyException,
768+
S3FilesMountConnectivityException,
769+
S3FilesMountFailureException,
770+
S3FilesMountTimeoutException,
765771
SerializedRequestEntityTooLargeException,
766772
ServiceException,
767773
SnapStartException,
@@ -994,6 +1000,24 @@ export var ResourceNotReadyException$: StaticErrorSchema = [-3, n0, _RNRE,
9941000
[0, 0]
9951001
];
9961002
n0_registry.registerError(ResourceNotReadyException$, ResourceNotReadyException);
1003+
export var S3FilesMountConnectivityException$: StaticErrorSchema = [-3, n0, _SFMCE,
1004+
{ [_e]: _c, [_hE]: 408 },
1005+
[_T, _M],
1006+
[0, 0]
1007+
];
1008+
n0_registry.registerError(S3FilesMountConnectivityException$, S3FilesMountConnectivityException);
1009+
export var S3FilesMountFailureException$: StaticErrorSchema = [-3, n0, _SFMFE,
1010+
{ [_e]: _c, [_hE]: 403 },
1011+
[_T, _M],
1012+
[0, 0]
1013+
];
1014+
n0_registry.registerError(S3FilesMountFailureException$, S3FilesMountFailureException);
1015+
export var S3FilesMountTimeoutException$: StaticErrorSchema = [-3, n0, _SFMTE,
1016+
{ [_e]: _c, [_hE]: 408 },
1017+
[_T, _M],
1018+
[0, 0]
1019+
];
1020+
n0_registry.registerError(S3FilesMountTimeoutException$, S3FilesMountTimeoutException);
9971021
export var SerializedRequestEntityTooLargeException$: StaticErrorSchema = [-3, n0, _SRETLE,
9981022
{ [_e]: _c, [_hE]: 413 },
9991023
[_T, _m],

clients/client-lambda/test/index-objects.spec.mjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,12 @@ import {
481481
Runtime,
482482
RuntimeVersionConfig$,
483483
RuntimeVersionError$,
484+
S3FilesMountConnectivityException,
485+
S3FilesMountConnectivityException$,
486+
S3FilesMountFailureException,
487+
S3FilesMountFailureException$,
488+
S3FilesMountTimeoutException,
489+
S3FilesMountTimeoutException$,
484490
ScalingConfig$,
485491
SchemaRegistryEventRecordFormat,
486492
SelfManagedEventSource$,
@@ -1149,6 +1155,12 @@ assert(ResourceNotFoundException.prototype instanceof LambdaServiceException);
11491155
assert(typeof ResourceNotFoundException$ === "object");
11501156
assert(ResourceNotReadyException.prototype instanceof LambdaServiceException);
11511157
assert(typeof ResourceNotReadyException$ === "object");
1158+
assert(S3FilesMountConnectivityException.prototype instanceof LambdaServiceException);
1159+
assert(typeof S3FilesMountConnectivityException$ === "object");
1160+
assert(S3FilesMountFailureException.prototype instanceof LambdaServiceException);
1161+
assert(typeof S3FilesMountFailureException$ === "object");
1162+
assert(S3FilesMountTimeoutException.prototype instanceof LambdaServiceException);
1163+
assert(typeof S3FilesMountTimeoutException$ === "object");
11521164
assert(SerializedRequestEntityTooLargeException.prototype instanceof LambdaServiceException);
11531165
assert(typeof SerializedRequestEntityTooLargeException$ === "object");
11541166
assert(ServiceException.prototype instanceof LambdaServiceException);

clients/client-lambda/test/index-types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,9 @@ export type {
598598
ResourceInUseException,
599599
ResourceNotFoundException,
600600
ResourceNotReadyException,
601+
S3FilesMountConnectivityException,
602+
S3FilesMountFailureException,
603+
S3FilesMountTimeoutException,
601604
SerializedRequestEntityTooLargeException,
602605
ServiceException,
603606
SnapStartException,

0 commit comments

Comments
 (0)