Skip to content

Commit 9fe1c63

Browse files
Update generated code (#1979)
update generated code
1 parent 6eaa3a8 commit 9fe1c63

File tree

4 files changed

+45
-1
lines changed

4 files changed

+45
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
- AWS api-change: Add NodeJs 24 (nodejs24.x) support to AWS Lambda.
88
- AWS api-change: Added `us-isob-west-1` region
9+
- AWS api-change: Added SerializedRequestEntityTooLargeException to Lambda Invoke API
910

1011
### Dependency bumped
1112

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
namespace AsyncAws\Lambda\Exception;
4+
5+
use AsyncAws\Core\Exception\Http\ClientException;
6+
use Symfony\Contracts\HttpClient\ResponseInterface;
7+
8+
/**
9+
* The processed request payload exceeded the `Invoke` request body size limit for asynchronous invocations. While the
10+
* event payload may be under 1 MB, the size after internal serialization exceeds the maximum allowed size for
11+
* asynchronous invocations.
12+
*/
13+
final class SerializedRequestEntityTooLargeException extends ClientException
14+
{
15+
/**
16+
* The error type.
17+
*
18+
* @var string|null
19+
*/
20+
private $type;
21+
22+
public function getType(): ?string
23+
{
24+
return $this->type;
25+
}
26+
27+
protected function populateResult(ResponseInterface $response): void
28+
{
29+
$data = $response->toArray(false);
30+
31+
$this->type = isset($data['Type']) ? (string) $data['Type'] : null;
32+
}
33+
}

src/Input/InvocationRequest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ final class InvocationRequest extends Input
5858
private $clientContext;
5959

6060
/**
61-
* The JSON that you want to provide to your Lambda function as input.
61+
* The JSON that you want to provide to your Lambda function as input. The maximum payload size is 6 MB for synchronous
62+
* invocations and 1 MB for asynchronous invocations.
6263
*
6364
* You can enter the JSON directly. For example, `--payload '{ "key": "value" }'`. You can also specify a file path. For
6465
* example, `--payload file://payload.json`.

src/LambdaClient.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
use AsyncAws\Lambda\Exception\ResourceConflictException;
4343
use AsyncAws\Lambda\Exception\ResourceNotFoundException;
4444
use AsyncAws\Lambda\Exception\ResourceNotReadyException;
45+
use AsyncAws\Lambda\Exception\SerializedRequestEntityTooLargeException;
4546
use AsyncAws\Lambda\Exception\ServiceException;
4647
use AsyncAws\Lambda\Exception\SnapStartException;
4748
use AsyncAws\Lambda\Exception\SnapStartNotReadyException;
@@ -129,6 +130,9 @@ public function addLayerVersionPermission($input): AddLayerVersionPermissionResp
129130
* Deletes a Lambda function. To delete a specific function version, use the `Qualifier` parameter. Otherwise, all
130131
* versions and aliases are deleted. This doesn't require the user to have explicit permissions for DeleteAlias.
131132
*
133+
* > A deleted Lambda function cannot be recovered. Ensure that you specify the correct function name and version before
134+
* > deleting.
135+
*
132136
* To delete Lambda event source mappings that invoke a function, use DeleteEventSourceMapping. For Amazon Web Services
133137
* services and resources that invoke your function directly, delete the trigger in the service where you originally
134138
* configured it.
@@ -201,6 +205,9 @@ public function getFunctionConfiguration($input): FunctionConfiguration
201205
* function asynchronously, set `InvocationType` to `Event`. Lambda passes the `ClientContext` object to your function
202206
* for synchronous invocations only.
203207
*
208+
* For synchronous invocations, the maximum payload size is 6 MB. For asynchronous invocations, the maximum payload size
209+
* is 1 MB.
210+
*
204211
* For synchronous invocation [^1], details about the function response, including errors, are included in the response
205212
* body and headers. For either invocation type, you can find more information in the execution log [^2] and trace [^3].
206213
*
@@ -273,6 +280,7 @@ public function getFunctionConfiguration($input): FunctionConfiguration
273280
* @throws ResourceConflictException
274281
* @throws ResourceNotFoundException
275282
* @throws ResourceNotReadyException
283+
* @throws SerializedRequestEntityTooLargeException
276284
* @throws ServiceException
277285
* @throws SnapStartException
278286
* @throws SnapStartNotReadyException
@@ -308,6 +316,7 @@ public function invoke($input): InvocationResponse
308316
'ResourceConflictException' => ResourceConflictException::class,
309317
'ResourceNotFoundException' => ResourceNotFoundException::class,
310318
'ResourceNotReadyException' => ResourceNotReadyException::class,
319+
'SerializedRequestEntityTooLargeException' => SerializedRequestEntityTooLargeException::class,
311320
'ServiceException' => ServiceException::class,
312321
'SnapStartException' => SnapStartException::class,
313322
'SnapStartNotReadyException' => SnapStartNotReadyException::class,

0 commit comments

Comments
 (0)