Interactions hang while replicating settings per environment
See original GitHub issueDescribe the bug After setting up an interaction category within an environment (eg dev) successfully, it will fail through cloudformation when attempting to configure within another environment (eg test). After digging deeper, I found this is because Amplify attempts to create a pre-existing intent that was already created through the dev environment.
Since amplify creates resources with the environment prefix (eg dev, test) would it make sense to also build out the intent resources in a similar manner?
To Reproduce
- Create Interactions category in dev environment
- Checkout test environment
- Run
amplify push -y
in the test environment - Cloudformation hangs
See error { “errorType”: “Runtime.UnhandledPromiseRejection”, “errorMessage”: “ResourceConflictException: The statement id (Lex-words1a103c15) provided already exists. Please provide a new statement id, or remove the existing statement.”, “reason”: { “errorType”: “ResourceConflictException”, “errorMessage”: “The statement id (Lex-words1a103c15) provided already exists. Please provide a new statement id, or remove the existing statement.”, “code”: “ResourceConflictException”, “message”: “The statement id (Lex-words1a103c15) provided already exists. Please provide a new statement id, or remove the existing statement.”, “time”: “2021-01-08T19:50:53.967Z”, “requestId”: “1a4e8e6b-3b28-4b7c-8f4a-f90f884b9197”, “statusCode”: 409, “retryable”: false, “retryDelay”: 25.416709266030146, “stack”: [ “ResourceConflictException: The statement id (Lex-words1a103c15) provided already exists. Please provide a new statement id, or remove the existing statement.”, " at Object.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:52:27)“, " at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/rest_json.js:55:8)”, " at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)“, " at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)”, " at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:688:14)“, " at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)”, " at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)“, " at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10”, " at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)“, " at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:690:12)” ] }, “promise”: {}, “stack”: [ “Runtime.UnhandledPromiseRejection: ResourceConflictException: The statement id (Lex-words1a103c15) provided already exists. Please provide a new statement id, or remove the existing statement.”, " at process.on (/var/runtime/index.js:37:15)“, " at process.emit (events.js:198:13)”, " at process.EventEmitter.emit (domain.js:448:20)“, " at emitPromiseRejectionWarnings (internal/process/promises.js:140:18)”, " at process._tickCallback (internal/process/next_tick.js:69:34)" ] }
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
I ran:
Hey @patweb99 thanks for the detailed repro steps! I was able to repro the bug.
As a workaround, you can modify the custom CFN labmda that spins up the Lex resource as follows: In index.js around line 30 modify it to: