Serverless Framework create HTTP API template not Working

78 Views Asked by At

I am currently trying to start serverless http api request using serverless framework tremplate but it is returning Timeout error messages.

I have installed serverless with the following command

npm install -g serverless@latest

I have created an IAM with programmatic Access key with aws cli also install and configured

aws configure 

whenever i tried to create a service from the boilerplate it throws an error

`Creating a new serverless project

   ? What do you want to make? AWS - Node.js - HTTP API
   ? What do you want to call this project? serverless-app
   Environment: linux, node 21.6.0, framework 3.38.0, plugin 7.2.0, SDK 4.5.1
   Docs:        docs.serverless.com
   Support:     forum.serverless.com
   Bugs:        github.com/serverless/serverless/issues

   Error:
   RequestError: Timeout awaiting 'request' for 30000ms
    at ClientRequest.<anonymous> (/usr/local/lib/node_modules/serverless/node_modules/got/dist   /source/core/index.js:970:65)
    at Object.onceWrapper (node:events:634:26)
    at ClientRequest.emit (node:events:531:35)
    at ClientRequest.emit (node:domain:488:12)
    at origin.emit (/usr/local/lib/node_modules/serverless/node_modules/@szmarczak/http-timer/dist   /source/index.js:43:20)
    at TLSSocket.socketErrorListener (node:_http_client:492:9)
    at TLSSocket.emit (node:events:519:28)
    at TLSSocket.emit (node:domain:488:12)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
    at Timeout.timeoutHandler [as _onTimeout] (/usr/local/lib/node_modules/serverless/node_modules/got/dist/source/core/utils/timed-out.js:36:25)
    at listOnTimeout (node:internal/timers:575:11)
    at process.processTimers (node:internal/timers:514:7)
   titan@titan:~/Documents$ serverless
   (node:70523) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a    userland alternative instead.
   (Use `node --trace-deprecation ...` to show where the warning was created)

`

I have updated the node version and also tried a few hack online and it is not working

0

There are 0 best solutions below