aws-samples / amazon-q-business-code-analysis

MIT License
21 stars 13 forks source link

CDK script fails on MacOS #2

Closed ariel17 closed 4 months ago

ariel17 commented 5 months ago
$ npx cdk deploy --parameters RepositoryUrl=https://github.com/aws-samples/amazon-q-business-code-analysis.git --parameters QAppUserId=example@example.com --parameters ProjectName=QPOC --require-approval never --profile default

✨  Synthesis time: 5.55s

QBusinessCodeAnalysisCdkStack: deploying... [1/1]
QBusinessCodeAnalysisCdkStack: creating CloudFormation changeset...
5:42:30 PM | CREATE_FAILED        | AWS::CloudFormation::CustomResource   | QBusinessAppConstr...AppCfnHookD812AF32
Received response status [FAILED] from custom resource. Message returned: Error: An error occurred (ValidationException) when calling the CreateA
pplication operation: IDC Instance ARN is required

Logs: /aws/lambda/QBusinessCodeAnalysisCdkS-QBusinessAppConstructQBu-vTwS0GwFmzfB

at invokeUserFunction (/var/task/framework.js:2:6)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async onEvent (/var/task/framework.js:1:369)
at async Runtime.handler (/var/task/cfn-response.js:1:1573) (RequestId: 49c97394-ace8-4aea-83c7-3ad8120392f7)

 ❌  QBusinessCodeAnalysisCdkStack failed: Error: The stack named QBusinessCodeAnalysisCdkStack failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Received response status [FAILED] from custom resource. Message returned: Error: An error occurred (ValidationException) when calling the CreateApplication operation: IDC Instance ARN is required

Logs: /aws/lambda/QBusinessCodeAnalysisCdkS-QBusinessAppConstructQBu-vTwS0GwFmzfB

    at invokeUserFunction (/var/task/framework.js:2:6)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async onEvent (/var/task/framework.js:1:369)
    at async Runtime.handler (/var/task/cfn-response.js:1:1573) (RequestId: 49c97394-ace8-4aea-83c7-3ad8120392f7)
    at FullCloudFormationDeployment.monitorDeployment (/Users/ariel17/Code/ariel17/amazon-q-business-code-analysis/cdk/node_modules/aws-cdk/lib/index.js:421:10232)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.deployStack2 [as deployStack] (/Users/ariel17/Code/ariel17/amazon-q-business-code-analysis/cdk/node_modules/aws-cdk/lib/index.js:424:180230)
    at async /Users/ariel17/Code/ariel17/amazon-q-business-code-analysis/cdk/node_modules/aws-cdk/lib/index.js:424:163478

 ❌ Deployment failed: Error: The stack named QBusinessCodeAnalysisCdkStack failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Received response status [FAILED] from custom resource. Message returned: Error: An error occurred (ValidationException) when calling the CreateApplication operation: IDC Instance ARN is required

Logs: /aws/lambda/QBusinessCodeAnalysisCdkS-QBusinessAppConstructQBu-vTwS0GwFmzfB

    at invokeUserFunction (/var/task/framework.js:2:6)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async onEvent (/var/task/framework.js:1:369)
    at async Runtime.handler (/var/task/cfn-response.js:1:1573) (RequestId: 49c97394-ace8-4aea-83c7-3ad8120392f7)
    at FullCloudFormationDeployment.monitorDeployment (/Users/ariel17/Code/ariel17/amazon-q-business-code-analysis/cdk/node_modules/aws-cdk/lib/index.js:421:10232)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.deployStack2 [as deployStack] (/Users/ariel17/Code/ariel17/amazon-q-business-code-analysis/cdk/node_modules/aws-cdk/lib/index.js:424:180230)
    at async /Users/ariel17/Code/ariel17/amazon-q-business-code-analysis/cdk/node_modules/aws-cdk/lib/index.js:424:163478

The stack named QBusinessCodeAnalysisCdkStack failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Received response status [FAILED] from custom resource. Message returned: Error: An error occurred (ValidationException) when calling the CreateApplication operation: IDC Instance ARN is required

Logs: /aws/lambda/QBusinessCodeAnalysisCdkS-QBusinessAppConstructQBu-vTwS0GwFmzfB

    at invokeUserFunction (/var/task/framework.js:2:6)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async onEvent (/var/task/framework.js:1:369)
    at async Runtime.handler (/var/task/cfn-response.js:1:1573) (RequestId: 49c97394-ace8-4aea-83c7-3ad8120392f7)
KBB99 commented 5 months ago

Thanks for raising this issue Ariel. This is due to the fact that Identity Center is now mandatory for Amazon Q apps. I will work on a fix and aim to have it pushed by the end of this week.

KBB99 commented 4 months ago

Hi @ariel17 . I have fixed the errors and validated they worked. Please check the Readme for latest instructions and let me know if you have any issues deploying!

ariel17 commented 4 months ago

Glad to know that! Sadly I'm not focused in this project for now; I will update if that changes. Thank you very much!