Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn cdk deploy fails with error "CREATE_FAILED" #51

Closed
trivikr opened this issue Nov 15, 2021 · 3 comments · Fixed by #53
Closed

yarn cdk deploy fails with error "CREATE_FAILED" #51

trivikr opened this issue Nov 15, 2021 · 3 comments · Fixed by #53
Labels
bug Something isn't working

Comments

@trivikr
Copy link
Contributor

trivikr commented Nov 15, 2021

Describe the bug

yarn cdk deploy fails with error "CREATE_FAILED"

Steps to reproduce

Follow the instructions in README.

  • Run yarn build:backend to generate backend bundles.
  • Run yarn dk deploy to deploy backend to AWS.

Observed behavior

The following error is thrown:

8:28:42 PM | CREATE_FAILED        | AWS::Lambda::Function                    | createNote/handler
Resource handler returned message: "Uploaded file must be a non-empty zip (Service: Lambda, Status Code
: 400, Request ID: 8251005a-39a5-4a87-a232-58993e099e18, Extended Request ID: null)" (RequestToken: 529
4d3ae-20fd-91d0-6b92-c5bb2eb7a56e, HandlerErrorCode: InvalidRequest)
8:28:42 PM | CREATE_FAILED        | AWS::Lambda::Function                    | listNotes/handler
Resource handler returned message: "Uploaded file must be a non-empty zip (Service: Lambda, Status Code
[██████████████████████▋···································] (18/46)

8:28:42 PM | CREATE_FAILED        | AWS::Lambda::Function                    | createNote/handler
Resource handler returned message: "Uploaded file must be a non-empty zip (Service: Lambda, Status Code
: 400, Request ID: 8251005a-39a5-4a87-a232-58993e099e18, Extended Request ID: null)" (RequestToken: 529
4d3ae-20fd-91d0-6b92-c5bb2eb7a56e, HandlerErrorCode: InvalidRequest)
8:28:42 PM | CREATE_FAILED        | AWS::Lambda::Function                    | listNotes/handler
Resource handler returned message: "Uploaded file must be a non-empty zip (Service: Lambda, Status Code
[████████████████████▏·····································] (16/46)

8:28:42 PM | CREATE_FAILED        | AWS::Lambda::Function                    | createNote/handler
Resource handler returned message: "Uploaded file must be a non-empty zip (Service: Lambda, Status Code
: 400, Request ID: 8251005a-39a5-4a87-a232-58993e099e18, Extended Request ID: null)" (RequestToken: 529
4d3ae-20fd-91d0-6b92-c5bb2eb7a56e, HandlerErrorCode: InvalidRequest)
8:28:42 PM | CREATE_FAILED        | AWS::Lambda::Function                    | listNotes/handler
Resource handler returned message: "Uploaded file must be a non-empty zip (Service: Lambda, Status Code
[█████████████████████▍····································] (17/46)

8:28:42 PM | CREATE_FAILED        | AWS::Lambda::Function                    | createNote/handler
Resource handler returned message: "Uploaded file must be a non-empty zip (Service: Lambda, Status Code
: 400, Request ID: 8251005a-39a5-4a87-a232-58993e099e18, Extended Request ID: null)" (RequestToken: 529
4d3ae-20fd-91d0-6b92-c5bb2eb7a56e, HandlerErrorCode: InvalidRequest)
8:28:42 PM | CREATE_FAILED        | AWS::Lambda::Function                    | listNotes/handler
Resource handler returned message: "Uploaded file must be a non-empty zip (Service: Lambda, Status Code
[███████████████▏··········································] (12/46)

8:28:42 PM | CREATE_FAILED        | AWS::Lambda::Function                    | createNote/handler
Resource handler returned message: "Uploaded file must be a non-empty zip (Service: Lambda, Status Code
: 400, Request ID: 8251005a-39a5-4a87-a232-58993e099e18, Extended Request ID: null)" (RequestToken: 529
4d3ae-20fd-91d0-6b92-c5bb2eb7a56e, HandlerErrorCode: InvalidRequest)
8:28:42 PM | CREATE_FAILED        | AWS::Lambda::Function                    | listNotes/handler
Resource handler returned message: "Uploaded file must be a non-empty zip (Service: Lambda, Status Code
[██████████················································] (8/46)

8:28:42 PM | CREATE_FAILED        | AWS::Lambda::Function                    | createNote/handler
Resource handler returned message: "Uploaded file must be a non-empty zip (Service: Lambda, Status Code
: 400, Request ID: 8251005a-39a5-4a87-a232-58993e099e18, Extended Request ID: null)" (RequestToken: 529
4d3ae-20fd-91d0-6b92-c5bb2eb7a56e, HandlerErrorCode: InvalidRequest)
8:28:42 PM | CREATE_FAILED        | AWS::Lambda::Function                    | listNotes/handler
Resource handler returned message: "Uploaded file must be a non-empty zip (Service: Lambda, Status Code
8:28:42 PM | CREATE_FAILED        | AWS::Lambda::Function                    | createNotehandlerBA768AA
5
Resource handler returned message: "Uploaded file must be a non-empty zip (Service: Lambda, Status Code
: 400, Request ID: 8251005a-39a5-4a87-a232-58993e099e18, Extended Request ID: null)" (RequestToken: 529
4d3ae-20fd-91d0-6b92-c5bb2eb7a56e, HandlerErrorCode: InvalidRequest)

        new Function (/Users/trivikr/workspace/aws-sdk-js-notes-app/node_modules/@aws-cdk/aws-lambda/lib/functier167C5FCF, deleteNotehandlerC903D399, updateNotehandler6A5A41DF]. Rollback requested by user.
on.js:135:26)
        \_ new NotesApi (/Users/trivikr/workspace/aws-sdk-js-notes-app/packages/infra/dist/notes-api.js:29:24)
        \_ new AwsSdkJsNotesAppStack (/Users/trivikr/workspace/aws-sdk-js-notes-app/packages/infra/dist/aws-sdk
-js-notes-app-stack.js:42:61)
        \_ Object.<anonymous> (/Users/trivikr/workspace/aws-sdk-js-notes-app/packages/infra/dist/aws-sdk-js-not
es-app.js:25:1)
        \_ Module._compile (node:internal/modules/cjs/loader:1101:14)
        \_ Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
        \_ Module.load (node:internal/modules/cjs/loader:981:32)
        \_ Function.Module._load (node:internal/modules/cjs/loader:822:12)
        \_ Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
        \_ node:internal/main/run_main_module:17:47

8:28:42 PM | CREATE_FAILED        | AWS::Lambda::Function                    | listNoteshandlerDC187D34
Resource handler returned message: "Uploaded file must be a non-empty zip (Service: Lambda, Status Code
: 400, Request ID: e84a2904-e8bc-4ee4-b78a-542cfdf39d20, Extended Request ID: null)" (RequestToken: 553
cc80c-cb4a-5566-166b-26eae110a993, HandlerErrorCode: InvalidRequest)

        new Function (/Users/trivikr/workspace/aws-sdk-js-notes-app/node_modules/@aws-cdk/aws-lambda/lib/functi
on.js:135:26)
        \_ new NotesApi (/Users/trivikr/workspace/aws-sdk-js-notes-app/packages/infra/dist/notes-api.js:29:24)
        \_ new AwsSdkJsNotesAppStack (/Users/trivikr/workspace/aws-sdk-js-notes-app/packages/infra/dist/aws-sdk
-js-notes-app-stack.js:38:60)
        \_ Object.<anonymous> (/Users/trivikr/workspace/aws-sdk-js-notes-app/packages/infra/dist/aws-sdk-js-not
es-app.js:25:1)
        \_ Module._compile (node:internal/modules/cjs/loader:1101:14)
        \_ Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
        \_ Module.load (node:internal/modules/cjs/loader:981:32)
        \_ Function.Module._load (node:internal/modules/cjs/loader:822:12)
        \_ Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
        \_ node:internal/main/run_main_module:17:47


 ❌  aws-sdk-js-notes-app failed: Error: The stack named aws-sdk-js-notes-app failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE
    at Object.waitForStackDeploy (/Users/trivikr/workspace/aws-sdk-js-notes-app/node_modules/aws-cdk/lib/api/util/cloudformation.ts:305:11)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Object.deployStack (/Users/trivikr/workspace/aws-sdk-js-notes-app/node_modules/aws-cdk/lib/api/deploy-stack.ts:294:26)
    at CdkToolkit.deploy (/Users/trivikr/workspace/aws-sdk-js-notes-app/node_modules/aws-cdk/lib/cdk-toolkit.ts:184:24)
    at initCommandLine (/Users/trivikr/workspace/aws-sdk-js-notes-app/node_modules/aws-cdk/bin/cdk.ts:213:9)
The stack named aws-sdk-js-notes-app failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE

Expected behavior

The backend gets deployed to AWS.

@trivikr trivikr added the bug Something isn't working label Nov 15, 2021
@trivikr
Copy link
Contributor Author

trivikr commented Nov 15, 2021

Emptied cdktoolkit-stagingbucket-xxxxx bucket as suggested in aws/aws-cdk#15798 (comment)

The issue is still reproducible.

@trivikr
Copy link
Contributor Author

trivikr commented Nov 15, 2021

The following things help:

  • Downgrade node to v14.x
  • Delete your cdk.out directory
  • Empty your cdk staging S3 bucket

Refs: aws/aws-cdk#12536 (comment)

@trivikr
Copy link
Contributor Author

trivikr commented Nov 15, 2021

Fixed by bumping crc32-stream to v4.0.2 in #53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant