Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"variables": {
"${LATEST}": "3.358.0"
"${LATEST}": "3.359.0"
},
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
"services": {
Expand Down
1 change: 1 addition & 0 deletions src/Service/Lambda/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

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

### Dependency bumped

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

namespace AsyncAws\Lambda\Exception;

use AsyncAws\Core\Exception\Http\ClientException;
use Symfony\Contracts\HttpClient\ResponseInterface;

/**
* The processed request payload exceeded the `Invoke` request body size limit for asynchronous invocations. While the
* event payload may be under 1 MB, the size after internal serialization exceeds the maximum allowed size for
* asynchronous invocations.
*/
final class SerializedRequestEntityTooLargeException extends ClientException
{
/**
* The error type.
*
* @var string|null
*/
private $type;

public function getType(): ?string
{
return $this->type;
}

protected function populateResult(ResponseInterface $response): void
{
$data = $response->toArray(false);

$this->type = isset($data['Type']) ? (string) $data['Type'] : null;
}
}
3 changes: 2 additions & 1 deletion src/Service/Lambda/src/Input/InvocationRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ final class InvocationRequest extends Input
private $clientContext;

/**
* The JSON that you want to provide to your Lambda function as input.
* The JSON that you want to provide to your Lambda function as input. The maximum payload size is 6 MB for synchronous
* invocations and 1 MB for asynchronous invocations.
*
* You can enter the JSON directly. For example, `--payload '{ "key": "value" }'`. You can also specify a file path. For
* example, `--payload file://payload.json`.
Expand Down
9 changes: 9 additions & 0 deletions src/Service/Lambda/src/LambdaClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
use AsyncAws\Lambda\Exception\ResourceConflictException;
use AsyncAws\Lambda\Exception\ResourceNotFoundException;
use AsyncAws\Lambda\Exception\ResourceNotReadyException;
use AsyncAws\Lambda\Exception\SerializedRequestEntityTooLargeException;
use AsyncAws\Lambda\Exception\ServiceException;
use AsyncAws\Lambda\Exception\SnapStartException;
use AsyncAws\Lambda\Exception\SnapStartNotReadyException;
Expand Down Expand Up @@ -129,6 +130,9 @@ public function addLayerVersionPermission($input): AddLayerVersionPermissionResp
* Deletes a Lambda function. To delete a specific function version, use the `Qualifier` parameter. Otherwise, all
* versions and aliases are deleted. This doesn't require the user to have explicit permissions for DeleteAlias.
*
* > A deleted Lambda function cannot be recovered. Ensure that you specify the correct function name and version before
* > deleting.
*
* To delete Lambda event source mappings that invoke a function, use DeleteEventSourceMapping. For Amazon Web Services
* services and resources that invoke your function directly, delete the trigger in the service where you originally
* configured it.
Expand Down Expand Up @@ -201,6 +205,9 @@ public function getFunctionConfiguration($input): FunctionConfiguration
* function asynchronously, set `InvocationType` to `Event`. Lambda passes the `ClientContext` object to your function
* for synchronous invocations only.
*
* For synchronous invocations, the maximum payload size is 6 MB. For asynchronous invocations, the maximum payload size
* is 1 MB.
*
* For synchronous invocation [^1], details about the function response, including errors, are included in the response
* body and headers. For either invocation type, you can find more information in the execution log [^2] and trace [^3].
*
Expand Down Expand Up @@ -273,6 +280,7 @@ public function getFunctionConfiguration($input): FunctionConfiguration
* @throws ResourceConflictException
* @throws ResourceNotFoundException
* @throws ResourceNotReadyException
* @throws SerializedRequestEntityTooLargeException
* @throws ServiceException
* @throws SnapStartException
* @throws SnapStartNotReadyException
Expand Down Expand Up @@ -308,6 +316,7 @@ public function invoke($input): InvocationResponse
'ResourceConflictException' => ResourceConflictException::class,
'ResourceNotFoundException' => ResourceNotFoundException::class,
'ResourceNotReadyException' => ResourceNotReadyException::class,
'SerializedRequestEntityTooLargeException' => SerializedRequestEntityTooLargeException::class,
'ServiceException' => ServiceException::class,
'SnapStartException' => SnapStartException::class,
'SnapStartNotReadyException' => SnapStartNotReadyException::class,
Expand Down
1 change: 1 addition & 0 deletions src/Service/S3/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

- AWS api-change: Added `us-isob-west-1` region
- Added `S3Client::putPublicAccessBlock()` method
- AWS api-change: Amazon Simple Storage Service / Features: Add conditional writes in CopyObject on destination key to prevent unintended object modifications.

### Dependency bumped

Expand Down
67 changes: 67 additions & 0 deletions src/Service/S3/src/Input/CopyObjectRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,37 @@ final class CopyObjectRequest extends Input
*/
private $grantWriteAcp;

/**
* Copies the object if the entity tag (ETag) of the destination object matches the specified tag. If the ETag values do
* not match, the operation returns a `412 Precondition Failed` error. If a concurrent operation occurs during the
* upload S3 returns a `409 ConditionalRequestConflict` response. On a 409 failure you should fetch the object's ETag
* and retry the upload.
*
* Expects the ETag value as a string.
*
* For more information about conditional requests, see RFC 7232 [^1].
*
* [^1]: https://tools.ietf.org/html/rfc7232
*
* @var string|null
*/
private $ifMatch;

/**
* Copies the object only if the object key name at the destination does not already exist in the bucket specified.
* Otherwise, Amazon S3 returns a `412 Precondition Failed` error. If a concurrent operation occurs during the upload S3
* returns a `409 ConditionalRequestConflict` response. On a 409 failure you should retry the upload.
*
* Expects the '*' (asterisk) character.
*
* For more information about conditional requests, see RFC 7232 [^1].
*
* [^1]: https://tools.ietf.org/html/rfc7232
*
* @var string|null
*/
private $ifNoneMatch;

/**
* The key of the destination object.
*
Expand Down Expand Up @@ -718,6 +749,8 @@ final class CopyObjectRequest extends Input
* GrantRead?: string|null,
* GrantReadACP?: string|null,
* GrantWriteACP?: string|null,
* IfMatch?: string|null,
* IfNoneMatch?: string|null,
* Key?: string,
* Metadata?: array<string, string>|null,
* MetadataDirective?: MetadataDirective::*|null,
Expand Down Expand Up @@ -764,6 +797,8 @@ public function __construct(array $input = [])
$this->grantRead = $input['GrantRead'] ?? null;
$this->grantReadAcp = $input['GrantReadACP'] ?? null;
$this->grantWriteAcp = $input['GrantWriteACP'] ?? null;
$this->ifMatch = $input['IfMatch'] ?? null;
$this->ifNoneMatch = $input['IfNoneMatch'] ?? null;
$this->key = $input['Key'] ?? null;
$this->metadata = $input['Metadata'] ?? null;
$this->metadataDirective = $input['MetadataDirective'] ?? null;
Expand Down Expand Up @@ -810,6 +845,8 @@ public function __construct(array $input = [])
* GrantRead?: string|null,
* GrantReadACP?: string|null,
* GrantWriteACP?: string|null,
* IfMatch?: string|null,
* IfNoneMatch?: string|null,
* Key?: string,
* Metadata?: array<string, string>|null,
* MetadataDirective?: MetadataDirective::*|null,
Expand Down Expand Up @@ -967,6 +1004,16 @@ public function getGrantWriteAcp(): ?string
return $this->grantWriteAcp;
}

public function getIfMatch(): ?string
{
return $this->ifMatch;
}

public function getIfNoneMatch(): ?string
{
return $this->ifNoneMatch;
}

public function getKey(): ?string
{
return $this->key;
Expand Down Expand Up @@ -1141,6 +1188,12 @@ public function request(): Request
if (null !== $this->grantWriteAcp) {
$headers['x-amz-grant-write-acp'] = $this->grantWriteAcp;
}
if (null !== $this->ifMatch) {
$headers['If-Match'] = $this->ifMatch;
}
if (null !== $this->ifNoneMatch) {
$headers['If-None-Match'] = $this->ifNoneMatch;
}
if (null !== $this->metadataDirective) {
if (!MetadataDirective::exists($this->metadataDirective)) {
throw new InvalidArgument(\sprintf('Invalid parameter "MetadataDirective" for "%s". The value "%s" is not a valid "MetadataDirective".', __CLASS__, $this->metadataDirective));
Expand Down Expand Up @@ -1427,6 +1480,20 @@ public function setGrantWriteAcp(?string $value): self
return $this;
}

public function setIfMatch(?string $value): self
{
$this->ifMatch = $value;

return $this;
}

public function setIfNoneMatch(?string $value): self
{
$this->ifNoneMatch = $value;

return $this;
}

public function setKey(?string $value): self
{
$this->key = $value;
Expand Down
10 changes: 5 additions & 5 deletions src/Service/S3/src/Input/DeleteObjectRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ final class DeleteObjectRequest extends Input
private $expectedBucketOwner;

/**
* The `If-Match` header field makes the request method conditional on ETags. If the ETag value does not match, the
* operation returns a `412 Precondition Failed` error. If the ETag matches or if the object doesn't exist, the
* operation will return a `204 Success (No Content) response`.
* Deletes the object if the ETag (entity tag) value provided during the delete operation matches the ETag of the object
* in S3. If the ETag values do not match, the operation returns a `412 Precondition Failed` error.
*
* For more information about conditional requests, see RFC 7232 [^1].
* Expects the ETag value as a string. `If-Match` does accept a string value of an '*' (asterisk) character to denote a
* match of any ETag.
*
* > This functionality is only supported for directory buckets.
* For more information about conditional requests, see RFC 7232 [^1].
*
* [^1]: https://tools.ietf.org/html/rfc7232
*
Expand Down
3 changes: 3 additions & 0 deletions src/Service/S3/src/Input/PutObjectTaggingRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ final class PutObjectTaggingRequest extends Input
private $expectedBucketOwner;

/**
* Confirms that the requester knows that she or he will be charged for the tagging object request. Bucket owners need
* not specify this parameter in their requests.
*
* @var RequestPayer::*|null
*/
private $requestPayer;
Expand Down
26 changes: 13 additions & 13 deletions src/Service/S3/src/Result/CompleteMultipartUploadOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ class CompleteMultipartUploadOutput extends Result
private $etag;

/**
* The Base64 encoded, 32-bit `CRC32 checksum` of the object. This checksum is only be present if the checksum was
* uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this
* value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values
* of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking
* object integrity [^1] in the *Amazon S3 User Guide*.
* The Base64 encoded, 32-bit `CRC32 checksum` of the object. This checksum is only present if the checksum was uploaded
* with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may
* not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each
* individual part. For more information about how checksums are calculated with multipart uploads, see Checking object
* integrity [^1] in the *Amazon S3 User Guide*.
*
* [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
*
Expand Down Expand Up @@ -96,11 +96,11 @@ class CompleteMultipartUploadOutput extends Result
private $checksumCrc64Nvme;

/**
* The Base64 encoded, 160-bit `SHA1` digest of the object. This will only be present if the object was uploaded with
* the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not
* be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each
* individual part. For more information about how checksums are calculated with multipart uploads, see Checking object
* integrity [^1] in the *Amazon S3 User Guide*.
* The Base64 encoded, 160-bit `SHA1` digest of the object. This checksum is only present if the checksum was uploaded
* with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value
* may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of
* each individual part. For more information about how checksums are calculated with multipart uploads, see Checking
* object integrity [^1] in the *Amazon S3 User Guide*.
*
* [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
*
Expand All @@ -109,9 +109,9 @@ class CompleteMultipartUploadOutput extends Result
private $checksumSha1;

/**
* The Base64 encoded, 256-bit `SHA256` digest of the object. This will only be present if the object was uploaded with
* the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not
* be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each
* The Base64 encoded, 256-bit `SHA256` digest of the object. This checksum is only present if the checksum was uploaded
* with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may
* not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each
* individual part. For more information about how checksums are calculated with multipart uploads, see Checking object
* integrity [^1] in the *Amazon S3 User Guide*.
*
Expand Down
12 changes: 6 additions & 6 deletions src/Service/S3/src/Result/GetObjectOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ class GetObjectOutput extends Result
private $checksumCrc32;

/**
* The Base64 encoded, 32-bit `CRC32C` checksum of the object. This will only be present if the object was uploaded with
* the object. For more information, see Checking object integrity [^1] in the *Amazon S3 User Guide*.
* The Base64 encoded, 32-bit `CRC32C` checksum of the object. This checksum is only present if the checksum was
* uploaded with the object. For more information, see Checking object integrity [^1] in the *Amazon S3 User Guide*.
*
* [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
*
Expand All @@ -125,8 +125,8 @@ class GetObjectOutput extends Result
private $checksumCrc64Nvme;

/**
* The Base64 encoded, 160-bit `SHA1` digest of the object. This will only be present if the object was uploaded with
* the object. For more information, see Checking object integrity [^1] in the *Amazon S3 User Guide*.
* The Base64 encoded, 160-bit `SHA1` digest of the object. This checksum is only present if the checksum was uploaded
* with the object. For more information, see Checking object integrity [^1] in the *Amazon S3 User Guide*.
*
* [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
*
Expand All @@ -135,8 +135,8 @@ class GetObjectOutput extends Result
private $checksumSha1;

/**
* The Base64 encoded, 256-bit `SHA256` digest of the object. This will only be present if the object was uploaded with
* the object. For more information, see Checking object integrity [^1] in the *Amazon S3 User Guide*.
* The Base64 encoded, 256-bit `SHA256` digest of the object. This checksum is only present if the checksum was uploaded
* with the object. For more information, see Checking object integrity [^1] in the *Amazon S3 User Guide*.
*
* [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
*
Expand Down
26 changes: 13 additions & 13 deletions src/Service/S3/src/Result/HeadObjectOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ class HeadObjectOutput extends Result
private $contentLength;

/**
* The Base64 encoded, 32-bit `CRC32 checksum` of the object. This checksum is only be present if the checksum was
* uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this
* value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values
* of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking
* object integrity [^1] in the *Amazon S3 User Guide*.
* The Base64 encoded, 32-bit `CRC32 checksum` of the object. This checksum is only present if the checksum was uploaded
* with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may
* not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each
* individual part. For more information about how checksums are calculated with multipart uploads, see Checking object
* integrity [^1] in the *Amazon S3 User Guide*.
*
* [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
*
Expand Down Expand Up @@ -130,11 +130,11 @@ class HeadObjectOutput extends Result
private $checksumCrc64Nvme;

/**
* The Base64 encoded, 160-bit `SHA1` digest of the object. This will only be present if the object was uploaded with
* the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not
* be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each
* individual part. For more information about how checksums are calculated with multipart uploads, see Checking object
* integrity [^1] in the *Amazon S3 User Guide*.
* The Base64 encoded, 160-bit `SHA1` digest of the object. This checksum is only present if the checksum was uploaded
* with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value
* may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of
* each individual part. For more information about how checksums are calculated with multipart uploads, see Checking
* object integrity [^1] in the *Amazon S3 User Guide*.
*
* [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
*
Expand All @@ -143,9 +143,9 @@ class HeadObjectOutput extends Result
private $checksumSha1;

/**
* The Base64 encoded, 256-bit `SHA256` digest of the object. This will only be present if the object was uploaded with
* the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not
* be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each
* The Base64 encoded, 256-bit `SHA256` digest of the object. This checksum is only present if the checksum was uploaded
* with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may
* not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each
* individual part. For more information about how checksums are calculated with multipart uploads, see Checking object
* integrity [^1] in the *Amazon S3 User Guide*.
*
Expand Down
Loading