fix(cli): handle unsupported S3 acceleration in migration - #14900
Open
hariharan077 wants to merge 1 commit into
Open
hariharan077 wants to merge 1 commit into
hariharan077 wants to merge 1 commit into
Conversation
2 tasks
sharonyajain
previously approved these changes
Aug 24, 2026
Treat an SDK-deserialized MethodNotAllowed response as an unsupported bucket acceleration capability and continue migration. Exercise the real S3 REST-XML deserialization path and preserve propagation of unrelated failures. Tests: cli-internal focused and full package suites; storage generator; build, ESLint, Prettier, and diff checks. --- Prompt: do it
hariharan077
force-pushed
the
fix-14876-s3-accelerate-method-not-allowed
branch
from
August 26, 2026 15:01
6ce5f77 to
f50c7d4
Compare
sharonyajain
self-requested a review
September 8, 2026 13:31
sharonyajain
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
Fixes #14876.
amplify gen2-migration generatecurrently fails when S3 returnsMethodNotAllowedforGetBucketAccelerateConfiguration, which can happen for buckets where transfer acceleration is unsupported. This updatesAwsFetcher.fetchBucketAccelerate()to treat onlyMethodNotAllowedas an unavailable acceleration state and returnundefined, while still propagating other S3 errors.The regression test uses a real
S3Clientagainst a mocked HTTP 405 REST-XML response. This exercises the AWS SDK deserializer and proves that<Code>MethodNotAllowed</Code>becomes an S3 service error whosenameisMethodNotAllowed.Description of how you validated changes
S3ServiceExceptionwithname === 'MethodNotAllowed', andfetchBucketAccelerate()rejected.undefined.@aws-amplify/cli-internalsuite: 131/131 suites, 802/802 tests, and 138/138 snapshots passed.@aws-amplify/cli-internalbuild passed.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.