Skip to content

(gen2-migration): Error during amplify gen2-migration generate - "Rule <env> does not exist on EventBus default" #14883

Description

@benjeater

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

v24.15.0

Amplify CLI Version

14.5.0

What operating system are you using?

Mac

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No manual changes made

Describe the bug

After setting up my environment with CDK, running amplify gen2-migration assess and amplify gen2-migration lock on my localben environment (not actually deployed locally, it's a gen 1 backend I use for developing on so I don't affect the shared dev env), I received the following error during amplify gen2-migration generate:

benjeater@Mac aerios-carrier-app % amplify gen2-migration generate --debug

⚠️  WARNING: AWS Amplify Gen 1 CLI is in maintenance mode and will reach end of life on May 1, 2027.
During maintenance mode, only critical bug fixes and security patches will be provided.
Migrate to Amplify Gen 2: https://docs.amplify.aws/react/start/migrate-to-gen2/

[WARNING] @aws-cdk/aws-apigatewayv2-alpha.WebSocketApiKeySelectionExpression is deprecated.
  
  This API will be removed in the next major release.
[WARNING] @aws-cdk/aws-apigatewayv2-alpha.WebSocketApiKeySelectionExpression is deprecated.
  
  This API will be removed in the next major release.
[WARNING] @aws-cdk/aws-apigatewayv2-alpha.MappingValue is deprecated.
  
  This API will be removed in the next major release.

[2026-05-15T08:13:07.636Z] [generate] [Aerios-Carrier-App/localben] → Planning
[2026-05-15T08:13:07.638Z] [generate] [Aerios-Carrier-App/localben] · Assessing resource: api/aerioscarrierapp (AppSync)
...LOTS MORE ASSESSING RESOURCE MESSAGES
[2026-05-15T08:13:07.665Z] [generate] [Aerios-Carrier-App/localben] · Fetching AppSync API
...LOTS MORE FETCHING MESSAGES
[2026-05-15T08:13:16.934Z] [generate] [Aerios-Carrier-App/localben] • → Planning failed

🛑 Rule localben does not exist on EventBus default.

Resolution: Please report this issue at https://github.com/aws-amplify/amplify-cli/issues and include the project identifier from: 'amplify diagnose --send-report'
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/

UnknownFault: Rule localben does not exist on EventBus default.
    at genericErrorToAmplifyException (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/amplify-exception-handler.js:129:49)
    at handleException (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/amplify-exception-handler.js:28:28)
    at process.<anonymous> (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/index.js:56:93)
    at process.emit (node:events:524:28)
    at process._fatalException (node:internal/process/execution:191:25)

Rule localben does not exist on EventBus default.
ResourceNotFoundException: Rule localben does not exist on EventBus default.
    at de_ResourceNotFoundExceptionRes (/snapshot/amplify-cli/build/node_modules/@aws-sdk/client-cloudwatch-events/dist-cjs/index.js:1542:23)
    at de_CommandError (/snapshot/amplify-cli/build/node_modules/@aws-sdk/client-cloudwatch-events/dist-cjs/index.js:1421:25)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async /snapshot/amplify-cli/build/node_modules/@smithy/middleware-serde/dist-cjs/index.js:8:24
    at async /snapshot/amplify-cli/build/node_modules/@smithy/core/dist-cjs/index.js:121:20
    at async /snapshot/amplify-cli/build/node_modules/@smithy/middleware-retry/dist-cjs/index.js:254:46
    at async /snapshot/amplify-cli/build/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js:5:26
    at async AwsFetcher.fetchFunctionSchedule (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/commands/gen2-migration/_common/aws-fetcher.js:106:30)
    at async FunctionGenerator.plan (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/commands/gen2-migration/generate/amplify/function/function.generator.js:49:26)
    at async AmplifyMigrationGenerateStep.forward (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/commands/gen2-migration/generate.js:168:33)
    at async Object.run (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/commands/gen2-migration.js:73:64)
    at async Object.executeAmplifyCommand (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/index.js:203:9)
    at async executePluginModuleCommand (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:139:5)
    at async executeCommand (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:37:9)
    at async Object.run (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/index.js:130:5)

Session Identifier: 4629744a-d07a-41b0-98f8-0ef894182780
benjeater@Mac aerios-carrier-app % 

Expected behavior

The amplify gen2-migration generate command should be able to generate gen2 code from the gen1 code as per the documentation.

https://docs.amplify.aws/react/start/migrate-to-gen2/migrate-existing-app/#step-3-generate

Reproduction steps

I am unable to provide reproduction steps from an empty directory because this is a migration issue which requires an existing application. These are the steps I have performed this morning.

  1. amplify gen2-migration lock --rollback - success
  2. amplify push api - success
  3. amplify gen2-migration lock - success
  4. amplify gen2-migration generate - error (v14.4.0)
  5. amplify upgrade - success
  6. amplify gen2-migration generate - error (v14.5.0)

Project Identifier

Unable to provide project identifier due to error with sending reports:

benjeater@Mac aerios-carrier-app % amplify diagnose --send-report         

⚠️  WARNING: AWS Amplify Gen 1 CLI is in maintenance mode and will reach end of life on May 1, 2027.
During maintenance mode, only critical bug fixes and security patches will be provided.
Migrate to Amplify Gen 2: https://docs.amplify.aws/react/start/migrate-to-gen2/


Learn more at https://docs.amplify.aws/cli/reference/diagnose/

✅ Report saved: /var/folders/7b/pd5ybfb55bdc4n4nc2nv2ybh0000gn/T/AeriosCarrierApp/report-1778832813238.zip

⠇ Sending zip
DiagnoseReportUploadError
✖ Sending zip

I have attached the report below.

report-1778832813238.zip

Log output

Details
# Put your logs below this line

2026-05-15T06:33:46.428Z|info : amplify gen2-migration core lock 
2026-05-15T06:33:46.489Z|info : @aws-amplify/amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}
2026-05-15T06:33:47.850Z|info : amplify-provider-awscloudformation.system-config-manager.getProfileConfig(["aerios-ben-profile"])
2026-05-15T06:33:47.852Z|info : amplify-provider-awscloudformation.system-config-manager.getProfiledAwsConfig.profileConfig([{"sso_session":"aerios-ben","sso_account_id":"[***]27981","sso_role_name":"[***]orAccess","region":"us-east-2","output":"json","credential_process":"aws configure export-credentials --profile aerios-ben-profile"}])
2026-05-15T07:02:56.914Z|info : amplify-provider-awscloudformation.system-config-manager.getProfileConfig(["aerios-ben-profile"])
2026-05-15T07:02:56.919Z|info : amplify-provider-awscloudformation.system-config-manager.getProfiledAwsConfig.profileConfig([{"sso_session":"aerios-ben","sso_account_id":"[***]27981","sso_role_name":"[***]orAccess","region":"us-east-2","output":"json","credential_process":"aws configure export-credentials --profile aerios-ben-profile"}])
2026-05-15T07:02:58.936Z|info : amplify-provider-awscloudformation.system-config-manager.getProfileConfig(["aerios-ben-profile"])
2026-05-15T07:02:58.937Z|info : amplify-provider-awscloudformation.system-config-manager.getProfiledAwsConfig.profileConfig([{"sso_session":"aerios-ben","sso_account_id":"[***]27981","sso_role_name":"[***]orAccess","region":"us-east-2","output":"json","credential_process":"aws configure export-credentials --profile aerios-ben-profile"}])
2026-05-15T07:02:59.320Z|info : amplify-provider-awscloudformation.zip-util.downloadZip.s3.getFile([{"Key":"[***]rent-[***]ud-[***]d.zip"},"localben"])
2026-05-15T07:02:59.323Z|info : amplify-provider-awscloudformation.aws-s3.s3.getFile([{"Key":"[***]rent-[***]ud-[***]d.zip","Bucket":"[***]ify-[***]rierapp-[***]lben-[***]a4-[***]ment"}])
2026-05-15T07:52:23.332Z|info : amplify gen2-migration core generate 
2026-05-15T07:52:23.395Z|info : @aws-amplify/amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}
2026-05-15T07:52:24.640Z|info : amplify-provider-awscloudformation.system-config-manager.getProfileConfig(["aerios-ben-profile"])
2026-05-15T07:52:24.642Z|info : amplify-provider-awscloudformation.system-config-manager.getProfiledAwsConfig.profileConfig([{"sso_session":"aerios-ben","sso_account_id":"[***]27981","sso_role_name":"[***]orAccess","region":"us-east-2","output":"json","credential_process":"aws configure export-credentials --profile aerios-ben-profile"}])
2026-05-15T07:53:00.117Z|error : Rule localben does not exist on EventBus default.
UnknownFault: Rule localben does not exist on EventBus default.
2026-05-15T07:53:44.241Z|info : amplify gen2-migration core generate {"debug":true,"yes":false}
2026-05-15T07:53:44.306Z|info : @aws-amplify/amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}
2026-05-15T07:53:45.639Z|info : amplify-provider-awscloudformation.system-config-manager.getProfileConfig(["aerios-ben-profile"])
2026-05-15T07:53:45.642Z|info : amplify-provider-awscloudformation.system-config-manager.getProfiledAwsConfig.profileConfig([{"sso_session":"aerios-ben","sso_account_id":"[***]27981","sso_role_name":"[***]orAccess","region":"us-east-2","output":"json","credential_process":"aws configure export-credentials --profile aerios-ben-profile"}])
2026-05-15T07:54:00.146Z|error : Rule localben does not exist on EventBus default.
UnknownFault: Rule localben does not exist on EventBus default.
2026-05-15T07:54:34.607Z|info : amplify diagnose core  {"send-report":true,"yes":false}
2026-05-15T07:54:34.670Z|info : @aws-amplify/amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}
2026-05-15T07:58:15.349Z|info : amplify version core  
2026-05-15T08:12:15.848Z|info : amplify upgrade core  
2026-05-15T08:12:15.909Z|info : @aws-amplify/amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}
2026-05-15T08:13:00.920Z|info : amplify gen2-migration core generate {"debug":true,"yes":false}
2026-05-15T08:13:00.971Z|info : @aws-amplify/amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}
2026-05-15T08:13:02.166Z|info : amplify-provider-awscloudformation.system-config-manager.getProfileConfig(["aerios-ben-profile"])
2026-05-15T08:13:02.168Z|info : amplify-provider-awscloudformation.system-config-manager.getProfiledAwsConfig.profileConfig([{"sso_session":"aerios-ben","sso_account_id":"[***]27981","sso_role_name":"[***]orAccess","region":"us-east-2","output":"json","credential_process":"aws configure export-credentials --profile aerios-ben-profile"}])
2026-05-15T08:13:17.047Z|error : Rule localben does not exist on EventBus default.
UnknownFault: Rule localben does not exist on EventBus default.
2026-05-15T08:13:32.920Z|info : amplify diagnose core  {"send-report":true,"yes":false}
2026-05-15T08:13:32.978Z|info : @aws-amplify/amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}

Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions