question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Interactions hang while replicating settings per environment

See original GitHub issue

Describe 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

  1. Create Interactions category in dev environment
  2. Checkout test environment
  3. Runamplify push -y in the test environment
  4. 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:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
edwardfoylecommented, Jan 8, 2021

I ran:

$ yes '' | amplify init
$ yes '' | amplify add interactions
$ amplify push --yes
$ amplify env add // named test using default profile
$ amplify push --yes
1reaction
edwardfoylecommented, Jan 11, 2021

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:

let intentParams = [
        
        {
            "name": `NewApp_${process.env.ENV}`,
Read more comments on GitHub >

github_iconTop Results From Across the Web

Center stage: Best practices for staging environments
Tips for developing and maintaining staging environments that will help you build more stable software systems.
Read more >
Step 10. Specify Guest Processing Settings
Select Use the selected guest interaction proxy servers only to explicitly define which servers will perform the guest interaction proxy role.
Read more >
Duplicating environments | Adobe Campaign
Most configuration elements are different for each environment: external accounts (mid-sourcing, routing, etc.), technical options (platform ...
Read more >
Using deployment-specific environment variables
For each of your deployments, Deployment Manager creates pre-defined environment variables that contain information inferred from your deployment.
Read more >
Docker Configuration Parameters for Confluent Platform
This topic describes how to configure the Docker images when starting Confluent Platform. You can dynamically specify configuration values in the Confluent ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found