How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v20.10.0
Amplify CLI Version
14.4.0
What operating system are you using?
Windows 11
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
Some Lambda resources had previously been modified manually in AWS Console:
- Lambda runtimes were updated to nodejs22.x
- Lambda execution roles had inline permissions added for Secrets Manager
- WebsocketMessageForwarder also had execute-api:ManageConnections permission
Before retrying migration, I updated the local Amplify Gen 1 function CloudFormation templates/custom-policies.json files and ran amplify push so the runtime/policy drift was mostly reconciled.
The current generate failure appears unrelated to those changes and occurs during S3 storage planning.
Describe the bug
I am migrating an Amplify Gen 1 app to Amplify Gen 2 using the official gen2-migration commands.
amplify gen2-migration lock --skip-validations succeeds, but amplify gen2-migration generate fails during the planning phase with:
"The specified method is not allowed against this resource."
Running with --debug shows the error comes from the S3 storage generator:
- AwsFetcher.fetchBucketAccelerate
- S3Generator.plan
- gen2-migration/generate/amplify/storage/s3.generator.js
The generator appears to call GetBucketAccelerateConfiguration on an S3 bucket in eu-north-1. That API returns MethodNotAllowed for this bucket/region.
The same error can be reproduced directly with AWS CLI:
aws s3api get-bucket-accelerate-configuration --bucket tiemerkintalaite-storage-for-vehicle111901-dev --region eu-north-1
This returns:
An error occurred (MethodNotAllowed) when calling the GetBucketAccelerateConfiguration operation: The specified method is not allowed against this resource.
Trying to set acceleration to suspended also fails:
aws s3api put-bucket-accelerate-configuration --bucket tiemerkintalaite-storage-for-vehicle111901-dev --accelerate-configuration Status=Suspended --region eu-north-1
This also returns MethodNotAllowed.
Expected behavior: the migration generator should handle this S3 API error gracefully, assume acceleration is unavailable/disabled, and continue generating the Gen 2 backend.
Expected behavior
amplify gen2-migration generate should complete successfully.
If GetBucketAccelerateConfiguration is not supported for a bucket/region, the migration tool should treat Transfer Acceleration as unavailable/disabled and continue generating the Gen 2 storage resource.
Reproduction steps
- Have an Amplify Gen 1 app in eu-north-1 with an Amplify-managed S3 storage resource.
- Run
amplify gen2-migration assess.
- Run
amplify gen2-migration lock --skip-validations.
- Run
amplify gen2-migration generate.
- The command fails during planning with:
The specified method is not allowed against this resource.
- Run
amplify gen2-migration generate --debug.
- Debug output shows failure in:
- AwsFetcher.fetchBucketAccelerate
- S3Generator.plan
Project Identifier
Region: eu-north-1
Amplify Gen 1 environment: dev
Storage resource name: tiemerkintastorageforvehicle
Physical S3 bucket: tiemerkintalaite-storage-for-vehicle111901-dev
Migration command: amplify gen2-migration generate
Session Identifier: 5a0e67be-d621-4c5c-91c7-5925e581b348
Log output
Details
# Put your logs below this line
UnknownFault: The specified method is not allowed against this resource.
MethodNotAllowed: The specified method is not allowed against this resource.
at throwDefaultError (...@smithy\smithy-client...)
at de_CommandError (...@aws-sdk\client-s3...)
at AwsFetcher.fetchBucketAccelerate (...@aws-amplify\cli-internal\lib\commands\gen2-migration\_common\aws-fetcher.js...)
at S3Generator.plan (...@aws-amplify\cli-internal\lib\commands\gen2-migration\generate\amplify\storage\s3.generator.js...)
at AmplifyMigrationGenerateStep.forward (...gen2-migration\generate.js...)
Additional information
No response
Before submitting, please confirm:
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v20.10.0
Amplify CLI Version
14.4.0
What operating system are you using?
Windows 11
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
Some Lambda resources had previously been modified manually in AWS Console:
Before retrying migration, I updated the local Amplify Gen 1 function CloudFormation templates/custom-policies.json files and ran amplify push so the runtime/policy drift was mostly reconciled.
The current generate failure appears unrelated to those changes and occurs during S3 storage planning.
Describe the bug
I am migrating an Amplify Gen 1 app to Amplify Gen 2 using the official gen2-migration commands.
amplify gen2-migration lock --skip-validationssucceeds, butamplify gen2-migration generatefails during the planning phase with:"The specified method is not allowed against this resource."
Running with
--debugshows the error comes from the S3 storage generator:The generator appears to call
GetBucketAccelerateConfigurationon an S3 bucket in eu-north-1. That API returnsMethodNotAllowedfor this bucket/region.The same error can be reproduced directly with AWS CLI:
aws s3api get-bucket-accelerate-configuration --bucket tiemerkintalaite-storage-for-vehicle111901-dev --region eu-north-1This returns:
An error occurred (MethodNotAllowed) when calling the GetBucketAccelerateConfiguration operation: The specified method is not allowed against this resource.Trying to set acceleration to suspended also fails:
aws s3api put-bucket-accelerate-configuration --bucket tiemerkintalaite-storage-for-vehicle111901-dev --accelerate-configuration Status=Suspended --region eu-north-1This also returns
MethodNotAllowed.Expected behavior: the migration generator should handle this S3 API error gracefully, assume acceleration is unavailable/disabled, and continue generating the Gen 2 backend.
Expected behavior
amplify gen2-migration generateshould complete successfully.If
GetBucketAccelerateConfigurationis not supported for a bucket/region, the migration tool should treat Transfer Acceleration as unavailable/disabled and continue generating the Gen 2 storage resource.Reproduction steps
amplify gen2-migration assess.amplify gen2-migration lock --skip-validations.amplify gen2-migration generate.The specified method is not allowed against this resource.amplify gen2-migration generate --debug.Project Identifier
Region: eu-north-1
Amplify Gen 1 environment: dev
Storage resource name: tiemerkintastorageforvehicle
Physical S3 bucket: tiemerkintalaite-storage-for-vehicle111901-dev
Migration command: amplify gen2-migration generate
Session Identifier: 5a0e67be-d621-4c5c-91c7-5925e581b348
Log output
Details
Additional information
No response
Before submitting, please confirm: