Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codegen the partitions data #4789

Merged
merged 2 commits into from
Jan 11, 2024
Merged

Conversation

sugmanue
Copy link
Contributor

@sugmanue sugmanue commented Dec 15, 2023

Motivation and Context

The partition data is currently embedded in a JSON string inside the DefaultPartitionDataProvider class and then parsed and converted into Java classes at runtime lazyly, this adds considerably slows down its first usage and also adds the risk of parsing errors at runtime. This change does the translation at codegen time instead and puts the data behind an inner class such that it would still be lazily initialized by the Java runtime.

This change will improve cold-start performance and the methods needed to parse from JSON are still present to it won't close the door for implementing another provider that will load the data from a JSON file at runtime.

The new codegen class looks like this:

/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.s3.endpoints.internal;

import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;

@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
public final class DefaultPartitionDataProvider implements PartitionDataProvider {
    @Override
    public Partitions loadPartitions() {
        return LazyPartitionsContainer.PARTITIONS;
    }

    static class LazyPartitionsContainer {
        static final Partitions PARTITIONS = Partitions
                .builder()
                .version("1.1")
                .addPartition(
                        Partition
                                .builder()
                                .id("aws")
                                .regionRegex("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$")
                                .putRegion("af-south-1", RegionOverride.builder().build())
                                .putRegion("ap-east-1", RegionOverride.builder().build())
                                .putRegion("ap-northeast-1", RegionOverride.builder().build())
                                .putRegion("ap-northeast-2", RegionOverride.builder().build())
                                .putRegion("ap-northeast-3", RegionOverride.builder().build())
                                .putRegion("ap-south-1", RegionOverride.builder().build())
                                .putRegion("ap-south-2", RegionOverride.builder().build())
                                .putRegion("ap-southeast-1", RegionOverride.builder().build())
                                .putRegion("ap-southeast-2", RegionOverride.builder().build())
                                .putRegion("ap-southeast-3", RegionOverride.builder().build())
                                .putRegion("ap-southeast-4", RegionOverride.builder().build())
                                .putRegion("aws-global", RegionOverride.builder().build())
                                .putRegion("ca-central-1", RegionOverride.builder().build())
                                .putRegion("eu-central-1", RegionOverride.builder().build())
                                .putRegion("eu-central-2", RegionOverride.builder().build())
                                .putRegion("eu-north-1", RegionOverride.builder().build())
                                .putRegion("eu-south-1", RegionOverride.builder().build())
                                .putRegion("eu-south-2", RegionOverride.builder().build())
                                .putRegion("eu-west-1", RegionOverride.builder().build())
                                .putRegion("eu-west-2", RegionOverride.builder().build())
                                .putRegion("eu-west-3", RegionOverride.builder().build())
                                .putRegion("il-central-1", RegionOverride.builder().build())
                                .putRegion("me-central-1", RegionOverride.builder().build())
                                .putRegion("me-south-1", RegionOverride.builder().build())
                                .putRegion("sa-east-1", RegionOverride.builder().build())
                                .putRegion("us-east-1", RegionOverride.builder().build())
                                .putRegion("us-east-2", RegionOverride.builder().build())
                                .putRegion("us-west-1", RegionOverride.builder().build())
                                .putRegion("us-west-2", RegionOverride.builder().build())
                                .outputs(
                                        Outputs.builder().dnsSuffix("amazonaws.com").dualStackDnsSuffix("api.aws")
                                                .supportsFips(true).supportsDualStack(true).build()).build())
                .addPartition(
                        Partition
                                .builder()
                                .id("aws-cn")
                                .regionRegex("^cn\\-\\w+\\-\\d+$")
                                .putRegion("aws-cn-global", RegionOverride.builder().build())
                                .putRegion("cn-north-1", RegionOverride.builder().build())
                                .putRegion("cn-northwest-1", RegionOverride.builder().build())
                                .outputs(
                                        Outputs.builder().dnsSuffix("amazonaws.com.cn")
                                                .dualStackDnsSuffix("api.amazonwebservices.com.cn").supportsFips(true)
                                                .supportsDualStack(true).build()).build())
                .addPartition(
                        Partition
                                .builder()
                                .id("aws-us-gov")
                                .regionRegex("^us\\-gov\\-\\w+\\-\\d+$")
                                .putRegion("aws-us-gov-global", RegionOverride.builder().build())
                                .putRegion("us-gov-east-1", RegionOverride.builder().build())
                                .putRegion("us-gov-west-1", RegionOverride.builder().build())
                                .outputs(
                                        Outputs.builder().dnsSuffix("amazonaws.com").dualStackDnsSuffix("api.aws")
                                                .supportsFips(true).supportsDualStack(true).build()).build())
                .addPartition(
                        Partition
                                .builder()
                                .id("aws-iso")
                                .regionRegex("^us\\-iso\\-\\w+\\-\\d+$")
                                .putRegion("aws-iso-global", RegionOverride.builder().build())
                                .putRegion("us-iso-east-1", RegionOverride.builder().build())
                                .putRegion("us-iso-west-1", RegionOverride.builder().build())
                                .outputs(
                                        Outputs.builder().dnsSuffix("c2s.ic.gov").dualStackDnsSuffix("c2s.ic.gov")
                                                .supportsFips(true).supportsDualStack(false).build()).build())
                .addPartition(
                        Partition
                                .builder()
                                .id("aws-iso-b")
                                .regionRegex("^us\\-isob\\-\\w+\\-\\d+$")
                                .putRegion("aws-iso-b-global", RegionOverride.builder().build())
                                .putRegion("us-isob-east-1", RegionOverride.builder().build())
                                .outputs(
                                        Outputs.builder().dnsSuffix("sc2s.sgov.gov").dualStackDnsSuffix("sc2s.sgov.gov")
                                                .supportsFips(true).supportsDualStack(false).build()).build())
                .addPartition(
                        Partition
                                .builder()
                                .id("aws-iso-e")
                                .regionRegex("^eu\\-isoe\\-\\w+\\-\\d+$")
                                .outputs(
                                        Outputs.builder().dnsSuffix("cloud.adc-e.uk").dualStackDnsSuffix("cloud.adc-e.uk")
                                                .supportsFips(true).supportsDualStack(false).build()).build())
                .addPartition(
                        Partition
                                .builder()
                                .id("aws-iso-f")
                                .regionRegex("^us\\-isof\\-\\w+\\-\\d+$")
                                .outputs(
                                        Outputs.builder().dnsSuffix("csp.hci.ic.gov").dualStackDnsSuffix("csp.hci.ic.gov")
                                                .supportsFips(true).supportsDualStack(false).build()).build()).build();
    }
}

Modifications

Testing

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

Instead of embedding the JSON string and parsing it at runtime
@sugmanue sugmanue marked this pull request as ready for review December 15, 2023 18:10
@sugmanue sugmanue requested a review from a team as a code owner December 15, 2023 18:10
@L-Applin
Copy link
Contributor

Are there no existing code-gen unit-test for this class? I would have expected them to require change since code-gen changed. In all cases, we probably should add one. Also, is there any way to check for potential regression in the returned partition object vs what was there before?

Copy link

sonarcloud bot commented Jan 10, 2024

Quality Gate Failed Quality Gate failed

Failed conditions

0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

Copy link
Contributor

@L-Applin L-Applin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all codegen-generated-classes-test run fine, which uses partition metadata in some way so I think we are good

@sugmanue sugmanue merged commit 4bd876e into master Jan 11, 2024
13 of 14 checks passed
@sugmanue sugmanue deleted the sugmanue/compiled-partitions-data branch January 11, 2024 22:00
L-Applin added a commit that referenced this pull request Feb 8, 2024
* Codegen the partitions data (#4789)

Instead of embedding the JSON string and parsing it at runtime

* Amazon WorkSpaces Update: Added AWS Workspaces RebootWorkspaces API - Extended Reboot documentation update

* Amazon EventBridge Update: Adding AppSync as an EventBridge Target

* Amazon EC2 Container Service Update: This release adds support for adding an ElasticBlockStorage volume configurations in ECS RunTask/StartTask/CreateService/UpdateService APIs. The configuration allows for attaching EBS volumes to ECS Tasks.

* AWS IoT Update: Add ConflictException to Update APIs of AWS IoT Software Package Catalog

* AWS IoT FleetWise Update: The following dataTypes have been removed: CUSTOMER_DECODED_INTERFACE in NetworkInterfaceType; CUSTOMER_DECODED_SIGNAL_INFO_IS_NULL in SignalDecoderFailureReason; CUSTOMER_DECODED_SIGNAL_NETWORK_INTERFACE_INFO_IS_NULL in NetworkInterfaceFailureReason; CUSTOMER_DECODED_SIGNAL in SignalDecoderType

* AWS Secrets Manager Update: Doc only update for Secrets Manager

* Amazon Elastic Compute Cloud Update: This release adds support for adding an ElasticBlockStorage volume configurations in ECS RunTask/StartTask/CreateService/UpdateService APIs. The configuration allows for attaching EBS volumes to ECS Tasks.

* Updated endpoints.json and partitions.json.

* Release 2.23.1. Updated CHANGELOG.md, README.md and all pom.xml.

* Update to next snapshot version: 2.23.2-SNAPSHOT

* Fixed the issue in AWS CRT HTTP clients where the connection is shut down unnecessarily (#4825)

* Fixed the issue where the connection is shut down unnecessarily

* Refactoring

* Address feedback

* Fix typo

* Update javadocs for paginator style methods (#4828)

* Don't shade org.apache.log4j (#4827)

- This is not a direct dependency of the SDK, and no log4j classes are actually
   included in the bundle, so we should not be shading it.
 - By not shading it, classes that we *do* include in the bundle, i.e. from
   apache-commons-logging can reference the log4j classes properly.

* AWS S3 Control Update: S3 On Outposts team adds dualstack endpoints support for S3Control and S3Outposts API calls.

* AWS Supply Chain Update: This release includes APIs CreateBillOfMaterialsImportJob and GetBillOfMaterialsImportJob.

* AWS Transfer Family Update: AWS Transfer Family now supports static IP addresses for SFTP & AS2 connectors and for async MDNs on AS2 servers.

* AmazonMWAA Update: This Amazon MWAA feature release includes new fields in CreateWebLoginToken response model. The new fields IamIdentity and AirflowIdentity will let you match identifications, as the Airflow identity length is currently hashed to 64 characters.

* Amazon Connect Service Update: Supervisor Barge for Chat is now supported through the MonitorContact API.

* Amazon Connect Participant Service Update: Introduce new Supervisor participant role

* Amazon Location Service Update: Location SDK documentation update. Added missing fonts to the MapConfiguration data type. Updated note for the SubMunicipality property in the place data type.

* Updated endpoints.json and partitions.json.

* Release 2.23.2. Updated CHANGELOG.md, README.md and all pom.xml.

* Removing s3Control functional test after update in s3control model

* Update to next snapshot version: 2.23.3-SNAPSHOT

* Amazon SageMaker Service Update: This release will have ValidationException thrown if certain invalid app types are provided. The release will also throw ValidationException if more than 10 account ids are provided in VpcOnlyTrustedAccounts.

* Release 2.23.3. Updated CHANGELOG.md, README.md and all pom.xml.

* Update to next snapshot version: 2.23.4-SNAPSHOT

* Enable compiled endpoint rules for s3, s3control and glacier (#4829)

* Propagating client apiCallTimeout values to S3Express createSession request configuration (#4831)

* AWS IoT Update: Revert release of LogTargetTypes

* AWS IoT FleetWise Update: Updated APIs: SignalNodeType query parameter has been added to ListSignalCatalogNodesRequest and ListVehiclesResponse has been extended with attributes field.

* Amazon Rekognition Update: This release adds ContentType and TaxonomyLevel attributes to DetectModerationLabels and GetMediaAnalysisJob API responses.

* Amazon Personalize Runtime Update: Documentation updates for Amazon Personalize

* Payment Cryptography Control Plane Update: Provide an additional option for key exchange using RSA wrap/unwrap in addition to tr-34/tr-31 in ImportKey and ExportKey operations. Added new key usage (type) TR31_M1_ISO_9797_1_MAC_KEY, for use with Generate/VerifyMac dataplane operations with ISO9797 Algorithm 1 MAC calculations.

* Amazon Personalize Update: Documentation updates for Amazon Personalize.

* Amazon Macie 2 Update: This release adds support for analyzing Amazon S3 objects that are encrypted using dual-layer server-side encryption with AWS KMS keys (DSSE-KMS). It also adds support for reporting DSSE-KMS details in statistics and metadata about encryption settings for S3 buckets and objects.

* AWS SecurityHub Update: Documentation updates for AWS Security Hub

* Updated endpoints.json and partitions.json.

* Release 2.23.4. Updated CHANGELOG.md, README.md and all pom.xml.

* Activating SRA auth for services with specific signer behaviors, and iam (#4821)

* Activating SRA auth for services with specific signer behaviors, and iam

* Adding changelog

* Update to next snapshot version: 2.23.5-SNAPSHOT

* Add Extension for @DynamoDBGeneratedUuid for EnhancedDynamoDB client (#4810)

* Add Extension for @DynamoDBGeneratedUuid for EnhancedDynamoDB client

* Handled PR comments

* Handled PR comments

* Check if stream is closed before trying to increment window. (#4833)

* Amazon Keyspaces Update: This release adds support for Multi-Region Replication with provisioned tables, and Keyspaces auto scaling APIs

* Amazon DynamoDB Update: Updating note for enabling streams for UpdateTable.

* Release 2.23.5. Updated CHANGELOG.md, README.md and all pom.xml.

* Update to next snapshot version: 2.23.6-SNAPSHOT

* Close the underlying crt connection and stream properly if the stream… (#4835)

* Close the underlying crt connection and stream properly if the stream is aborted or closed in the AWS CRT HTTP client

* Add more tests

* Elastic Disaster Recovery Service Update: Removed invalid and unnecessary default values.

* AWS B2B Data Interchange Update: Increasing TestMapping inputFileContent file size limit to 5MB and adding file size limit 250KB for TestParsing input file. This release also includes exposing InternalServerException for Tag APIs.

* Amazon SageMaker Feature Store Runtime Update: Increase BatchGetRecord limits from 10 items to 100 items

* AWS CloudTrail Update: This release adds a new API ListInsightsMetricData to retrieve metric data from CloudTrail Insights.

* Amazon Kinesis Firehose Update: Allow support for Snowflake as a Kinesis Data Firehose delivery destination.

* Amazon Connect Service Update: GetMetricDataV2 now supports 3 groupings

* Updated endpoints.json and partitions.json.

* Release 2.23.6. Updated CHANGELOG.md, README.md and all pom.xml.

* Update to next snapshot version: 2.23.7-SNAPSHOT

* Expose client-level context params on service client configuration (#4834)

* Expose client-level context params on service client configuration

* Expose client-level context params on service client configuration

* Added changelog

* Reverted unnecessary change to AttributeMap

* Modified changelog

* Amazon Athena Update: Introducing new NotebookS3LocationUri parameter to Athena ImportNotebook API. Payload is no longer required and either Payload or NotebookS3LocationUri needs to be provided (not both) for a successful ImportNotebook API call. If both are provided, an InvalidRequestException will be thrown.

* Amazon Q Connect Update: Increased Quick Response name max length to 100

* AWS CodeBuild Update: Release CodeBuild Reserved Capacity feature

* Amazon DynamoDB Update: This release adds support for including ApproximateCreationDateTimePrecision configurations in EnableKinesisStreamingDestination API, adds the same as an optional field in the response of DescribeKinesisStreamingDestination, and adds support for a new UpdateKinesisStreamingDestination API.

* Updated endpoints.json and partitions.json.

* Release 2.23.7. Updated CHANGELOG.md, README.md and all pom.xml.

* Update to next snapshot version: 2.23.8-SNAPSHOT

* Fixed a thread safety issue that could cause application to crash in … (#4839)

* Fixed a thread safety issue that could cause application to crash in the edge case in AWS CRT HTTP client

* Add tests

* Amazon CloudFront KeyValueStore Update: This release improves upon the DescribeKeyValueStore API by returning two additional fields, Status of the KeyValueStore and the FailureReason in case of failures during creation of KeyValueStore.

* AWS Cloud9 Update: Doc-only update around removing AL1 from list of available AMIs for Cloud9

* Amazon Connect Cases Update: This release adds the ability to view audit history on a case and introduces a new parameter, performedBy, for CreateCase and UpdateCase API's.

* Amazon Relational Database Service Update: Introduced support for the InsufficientDBInstanceCapacityFault error in the RDS CreateDBCluster API method. This provides enhanced error handling, ensuring a more robust experience when creating database clusters with insufficient instance capacity.

* AWS AppConfig Data Update: Fix FIPS Endpoints in aws-us-gov.

* FinSpace User Environment Management service Update: Allow customer to set zip default through command line arguments.

* Amazon Elastic Compute Cloud Update: Documentation updates for Amazon EC2.

* Amazon EC2 Container Service Update: This release adds support for Transport Layer Security (TLS) and Configurable Timeout to ECS Service Connect. TLS facilitates privacy and data security for inter-service communications, while Configurable Timeout allows customized per-request timeout and idle timeout for Service Connect services.

* AWS Organizations Update: Doc only update for quota increase change

* Release 2.23.8. Updated CHANGELOG.md, README.md and all pom.xml.

* Update to next snapshot version: 2.23.9-SNAPSHOT

* Inspector2 Update: This release adds support for CIS scans on EC2 instances.

* Release 2.23.9. Updated CHANGELOG.md, README.md and all pom.xml.

* Update to next snapshot version: 2.23.10-SNAPSHOT

* Amazon EC2 Container Service Update: Documentation updates for Amazon ECS.

* AWS Outposts Update: DeviceSerialNumber parameter is now optional in StartConnection API

* Amazon Relational Database Service Update: This release adds support for Aurora Limitless Database.

* Amazon Elastic Compute Cloud Update: Introduced a new clientToken request parameter on CreateNetworkAcl and CreateRouteTable APIs. The clientToken parameter allows idempotent operations on the APIs.

* AWS Storage Gateway Update: Add DeprecationDate and SoftwareVersion to response of ListGateways.

* Release 2.23.10. Updated CHANGELOG.md, README.md and all pom.xml.

* Update to next snapshot version: 2.23.11-SNAPSHOT

* Endpoint based auth scheme resolver should honor endpoint overrides (#4838)

* Amazon Lightsail Update: This release adds support for IPv6-only instance plans.

* AWS Certificate Manager Private Certificate Authority Update: AWS Private CA now supports an option to omit the CDP extension from issued certificates, when CRL revocation is enabled.

* Release 2.23.11. Updated CHANGELOG.md, README.md and all pom.xml.

* Update to next snapshot version: 2.23.12-SNAPSHOT

* A few javadoc corrections (#4848)

* Performance improvements (#4850)

* Amazon Connect Service Update: Update list and string length limits for predefined attributes.

* Inspector2 Update: This release adds ECR container image scanning based on their lastRecordedPullTime.

* Amazon SageMaker Service Update: Amazon SageMaker Automatic Model Tuning now provides an API to programmatically delete tuning jobs.

* Release 2.23.12. Updated CHANGELOG.md, README.md and all pom.xml.

* Update to next snapshot version: 2.23.13-SNAPSHOT

* Add option to disable IMDS v1 fallback when token is not returned (#4840)

* Add option to disable IMDS v1 fallback when token is not returned for IMDS credential calls

* updating IMDS fallback message

* Update requestcompression codegen name (#4851)

* Update codegen to get requestcompression instead of requestCompression

* Update test models

* Fix for issue #4720 , Cross Region enabled Clients created in US-EAST-1 will by internally disable global endpoint and do a regional endpoint call. (#4849)

* Fix for issue #4720 , Cross Region enabled Clients created in US-EAST-1 will by internally disable global endpoint and do a regional endpoint call.

* Handled Zoe's comments

* Update test case where endppoint resolution is checked for atleast once (#4854)

* Auto Scaling Update: EC2 Auto Scaling customers who use attribute based instance-type selection can now intuitively define their Spot instances price protection limit as a percentage of the lowest priced On-Demand instance type.

* Amazon Relational Database Service Update: Introduced support for the InsufficientDBInstanceCapacityFault error in the RDS RestoreDBClusterFromSnapshot and RestoreDBClusterToPointInTime API methods. This provides enhanced error handling, ensuring a more robust experience.

* Amazon Elastic Compute Cloud Update: EC2 Fleet customers who use attribute based instance-type selection can now intuitively define their Spot instances price protection limit as a percentage of the lowest priced On-Demand instance type.

* AmazonMWAA Update: This release adds MAINTENANCE environment status for Amazon MWAA environments.

* Amazon Import/Export Snowball Update: Modified description of createaddress to include direction to add path when providing a JSON file.

* Amazon Comprehend Update: Comprehend PII analysis now supports Spanish input documents.

* Updated endpoints.json and partitions.json.

* Release 2.23.13. Updated CHANGELOG.md, README.md and all pom.xml.

* Update to next snapshot version: 2.23.14-SNAPSHOT

* Minor GitHub workflow changes (#4847)

* chore: a more polite closed issue message

* chore: relax stale issue timing

* Reduce memory usage in S3 when plugins aren't used. (#4857)

Modifying the SDK client configuration at the request level uses extra memory, because it requires copying the existing configuration map.

Before this change, we always modify the client configuration with each request to add the client instance. This change moves this modification to the client-creation, so that the configuration doesn't need to be copied unless plugins also modify the configuration.

This change also removes the conditional logic that only added the client for S3, which simplifies the code generator.

* Amazon DataZone Update: Add new skipDeletionCheck to DeleteDomain. Add new skipDeletionCheck to DeleteProject which also automatically deletes dependent objects

* Amazon Route 53 Update: Update the SDKs for text changes in the APIs.

* Release 2.23.14. Updated CHANGELOG.md, README.md and all pom.xml.

* Update to next snapshot version: 2.23.15-SNAPSHOT

* Performance improvements for SRA changes. (#4864)

1. Do not call SignerProperty.toString() whenever required properties are read.
2. Check if an SdkHttpRequest is an SdkHttpFullRequest before performing a full conversion to the latter.

* Performance optimizations in ExecutionInterceptorChain (#4863)

1. Removed apply*Hack method. This method wasn't doing anything, because its side effects were immediately overridden.
2. Do not modify the execution context in the modify* methods unless the interceptor requests a modification. The time added by the comparisons are less than the cost of always modifying the interceptor context, because modifying the execution context is relatively rare.

* Reduce memory usage for chunk-encoded streaming uploads, like those used by flexible checksums in S3. (#4858)

Before this change, our chunk encoding logic would copy customer data five times:
1. [From the customer's stream into a byte array.](https://github.com/aws/aws-sdk-java-v2/blob/6040b2be6731e4b5ef64e775a2cfffb07d76766c/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/internal/signer/chunkedencoding/ChunkedEncodedInputStream.java#L106-L107)
2. [From the byte array into a slightly smaller byte array.](https://github.com/aws/aws-sdk-java-v2/blob/6040b2be6731e4b5ef64e775a2cfffb07d76766c/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/internal/signer/chunkedencoding/ChunkedEncodedInputStream.java#L111)
3. [From the smaller byte array into a byte array output stream.](https://github.com/aws/aws-sdk-java-v2/blob/6040b2be6731e4b5ef64e775a2cfffb07d76766c/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/internal/signer/chunkedencoding/ChunkedEncodedInputStream.java#L171)
4. [From the byte array output stream into an array.](https://github.com/aws/aws-sdk-java-v2/blob/6040b2be6731e4b5ef64e775a2cfffb07d76766c/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/internal/signer/chunkedencoding/ChunkedEncodedInputStream.java#L149)
5. [From the array into the output array.](https://github.com/aws/aws-sdk-java-v2/blob/6040b2be6731e4b5ef64e775a2cfffb07d76766c/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/internal/signer/chunkedencoding/ChunkedEncodedInputStream.java#L85)

After this change, the logic will copy the data twice:
1. From the customer's stream into a byte array.
2. From the byte array into the output array.

There's a path to make it only one copy, but it requires the chunk encoded input stream to know the length of the underlying stream so that it can detect when the last chunk will be encountered. This will require additional piping, so we can do it in a follow-up PR.

* Add support for disable IMDS v1 fallback for regions

* Various Maven fixes: 1. consume DynamoDB Local from Maven instead of S3 2. Fix Maven warnings (#4859)

* Optimizing profile file loading

* Elastic Load Balancing Update: This release enables unhealthy target draining intervals for Network Load Balancers.

* AWS CloudFormation Update: CloudFormation IaC generator allows you to scan existing resources in your account and select resources to generate a template for a new or existing CloudFormation stack.

* AWS Glue Update: Update page size limits for GetJobRuns and GetTriggers APIs.

* Amazon Simple Systems Manager (SSM) Update: This release adds an optional Duration parameter to StateManager Associations. This allows customers to specify how long an apply-only-on-cron association execution should run. Once the specified Duration is out all the ongoing cancellable commands or automations are cancelled.

* Updated endpoints.json and partitions.json.

* Release 2.23.15. Updated CHANGELOG.md, README.md and all pom.xml.

* Update to next snapshot version: 2.23.16-SNAPSHOT

* Fix check for release tag (#4871)

The original check checks whether the tag *exists* in the local and then tries
to remove it from the public repo. However, it's possible that the tag is in the
private repo, where it might not exists (refs from both remotes are present
locally).

This commit fixes this by explicitly check if the tag exists in the public repo
and only then will it try to delete it.

* Exclude endpoint provider tests to speed up the build (#4860)

* Exclude endpoint provider tests to speed up the build

* Update CI and add buildspec for endpoints test

* Fix cloudformation template

* Update japicmp config (#4872)

* caching resolved values

* adding back commented test

* Changed to use lazy value for credential provider

* Activating SRA auth for 25 services with control plane type APIs (#4874)

* Amazon Cognito Identity Provider Update: Added CreateIdentityProvider and UpdateIdentityProvider details for new SAML IdP features

* Amazon Neptune Graph Update: Adding new APIs in SDK for Amazon Neptune Analytics. These APIs include operations to execute, cancel, list queries and get the graph summary.

* AWS Elemental MediaConvert Update: This release includes support for broadcast-mixed audio description tracks.

* Amazon Interactive Video Service Update: This release introduces a new resource Playback Restriction Policy which can be used to geo-restrict or domain-restrict channel stream playback when associated with a channel. New APIs to support this resource were introduced in the form of Create/Delete/Get/Update/List.

* Amazon Managed Blockchain Query Update: This release adds support for transactions that have not reached finality. It also removes support for the status property from the response of the GetTransaction operation. You can use the confirmationStatus and executionStatus properties to determine the status of the transaction.

* Updated endpoints.json and partitions.json.

* Release 2.23.16. Updated CHANGELOG.md, README.md and all pom.xml.

* Add option to disable EC2 metadata (IMDS) calls without token (#4866)

* Add option to disable IMDS v1 fallback when token is not returned (#4840)
* Add support for disable IMDS v1 fallback for regions

* Cache whether CRT is available in the flexible checksum algorithm. (#4878)

* Update to next snapshot version: 2.23.17-SNAPSHOT

* Bump maven wrapper plugin version (#4879)

* Performance improvement for sigv4 signing. (#4867)

1. When trimming and removing consecutive spaces during sigv4 normalization, copy word-by-word instead of character-by-character. This reduces the overhead of range and encoding checks in string builder.
2. Increase starting string builder size for canonical headers, to limit resizing (2048 worked well for DynamoDB's get-item).
3. Use a switch statement for whitespace checks instead of consecutive if statements. On my compiler, the switch statement compiles to a jump table which runs quicker.

* Expose futureCompletionExecutor on S3 CRT client (#4880)

* Expose futureCompletionExecutor on S3 CRT client

* Adderss feedback and fix build

* Amazon SageMaker Service Update: Amazon SageMaker Canvas adds GenerativeAiSettings support for CanvasAppSettings.

* Amazon DynamoDB Update: Any number of users can execute up to 50 concurrent restores (any type of restore) in a given account.

* Updated endpoints.json and partitions.json.

* Release 2.23.17. Updated CHANGELOG.md, README.md and all pom.xml.

* Enable compiled endpoint rules for the second wave (#4883)

Services included are: backupstorage, codecatalyst, cognitoidentity, kinesis, mediastoredata, transcribe, transcribestreaming

* Revert "Performance improvement for sigv4 signing. (#4867)"

This reverts commit 0ab7f75.

* Update to next snapshot version: 2.23.18-SNAPSHOT

* AWS Glue Update: Introduce Catalog Encryption Role within Glue Data Catalog Settings. Introduce SASL/PLAIN as an authentication method for Glue Kafka connections

* Amazon WorkSpaces Update: Added definitions of various WorkSpace states

* Release 2.23.18. Updated CHANGELOG.md, README.md and all pom.xml.

* update aws-sdk-java pom to add imds and dyanmodb-enhanced (#4890)

* Performance improvement for sigv4 signing. (#4891)

This is a reintroduction of the reverted commit #4867. This includes a fix to the issue that caused the revert: improper handling of empty header values.

* Update to next snapshot version: 2.23.19-SNAPSHOT

* Delete CloudSearchv2IntegrationTest (#4888)

* Fix tag deletion command (#4892)

* including S3 Access Grants Plugin as part of Java SDK Bundle (#4881)

* including S3 Access Grants Plugin as part of Java SDK Bundle

---------

Co-authored-by: Shiva Kumar Mukkapati <mshvkmr@amazon.com>

* Archive old changelog entries (< 2.23.0) (#4873)

- .json files files for each version are grouped under minor versions in
   .changes
 - Markdown files for each minor version are created in changelogs/ directory
 - Changelog scripts updated to add a link to older version in the generated
   changelog

* Changing indentation of config files to 4 spaces (#4889)

* Amazon EC2 Container Service Update: This release is a documentation only update to address customer issues.

* AWS WAFV2 Update: You can now delete an API key that you've created for use with your CAPTCHA JavaScript integration API.

* Amazon OpenSearch Service Update: This release adds clear visibility to the customers on the changes that they make on the domain.

* AWS AppSync Update: Support for environment variables in AppSync GraphQL APIs

* Amazon CloudWatch Logs Update: This release adds a new field, logGroupArn, to the response of the logs:DescribeLogGroups action.

* Amazon Elasticsearch Service Update: This release adds clear visibility to the customers on the changes that they make on the domain.

* Release 2.23.19. Updated CHANGELOG.md, README.md and all pom.xml.

* Update to next snapshot version: 2.23.20-SNAPSHOT

* Bump CRT version and expose setting memory limits for S3 calls (#4885)

* Bump aws-crt version to 0.29.9

* Exposes a setting to set the memory limit when making asynchronous calls with the CRT-based S3 client

* Activating SRA for this service (#4896)

* Fix request cancellation logic in the AWS CRT Sync HTTP client (#4887)

* Fix request cancellation logic in the AWS CRT Sync HTTP client

* Address feedback

* AWS DataSync Update: AWS DataSync now supports manifests for specifying files or objects to transfer.

* Amazon Redshift Update: LisRecommendations API to fetch Amazon Redshift Advisor recommendations.

* Amazon Lex Model Building V2 Update: This release introduces a new bot replication feature as part of Lex Global Resiliency offering. This feature leverages a new set of APIs that allow customers to create bot replicas and replicate changes to bots across regions.

* Updated endpoints.json and partitions.json.

* Release 2.23.20. Updated CHANGELOG.md, README.md and all pom.xml.

* Update to next snapshot version: 2.23.21-SNAPSHOT

---------

Co-authored-by: Manuel Sugawara <sugmanue@amazon.com>
Co-authored-by: AWS <>
Co-authored-by: aws-sdk-java-automation <43143862+aws-sdk-java-automation@users.noreply.github.com>
Co-authored-by: Zoe Wang <33073555+zoewangg@users.noreply.github.com>
Co-authored-by: David Ho <70000000+davidh44@users.noreply.github.com>
Co-authored-by: Dongie Agnir <261310+dagnir@users.noreply.github.com>
Co-authored-by: John Viegas <joviegas@amazon.com>
Co-authored-by: John Viegas <70235430+joviegas@users.noreply.github.com>
Co-authored-by: Anna-Karin Salander <salande@amazon.com>
Co-authored-by: Anirudh <anirudh93@gmail.com>
Co-authored-by: Debora N. Ito <476307+debora-ito@users.noreply.github.com>
Co-authored-by: Matthew Miller <millem@amazon.com>
Co-authored-by: Tom Keller <1083460+kellertk@users.noreply.github.com>
Co-authored-by: Dongie Agnir <dongie@amazon.com>
Co-authored-by: shiva kumar <62441208+shiva958@users.noreply.github.com>
Co-authored-by: Shiva Kumar Mukkapati <mshvkmr@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants