serverless-localstack
serverless-localstack copied to clipboard
Recoverable error occurred () **EMPTY ERROR**
Hi, I am having an hard time figuring this out. I am trying to deploy a lambda to localstack and having an error. Fair enough, but the error is actually empty, thats the problem.
....
Serverless: config.stage: local
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Recoverable error occurred (), sleeping for ~6 seconds. Try 1 of 4
Serverless: Recoverable error occurred (), sleeping for ~6 seconds. Try 2 of 4
Serverless: Recoverable error occurred (), sleeping for ~4 seconds. Try 3 of 4
Serverless: Recoverable error occurred (), sleeping for ~5 seconds. Try 4 of 4
Serverless Error ----------------------------------------
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: darwin
Node Version: 16.10.0
Framework Version: 2.64.1
Plugin Version: 5.5.0
SDK Version: 4.3.0
Components Version: 3.17.1
And this is my serverless.yml
plugins:
- serverless-localstack
custom:
localstack:
debug: true
stages:
- local
- dev
endpointFile: localstack_endpoints.json
frameworkVersion: '2'
provider:
name: aws
runtime: nodejs12.x
lambdaHashingVersion: 20201221
region: eu-west-1
functions:
hello:
handler: handler.hello```
is anybody able to shed some light on this?
I'm having the same issue with serverless 2.71.0. Anyone has solution?
you can add DEBUG=1 on your docker-compose and try to run. It adds a whole lot on the docker logs which might be helpful.
Hi I had a similar empty error, and with some tips from the @adrtorre I found the cause in my case.
Im using localstack running with Docker-Compose and I set the enviroment variable like below,
localstack: image: localstack/localstack container_name: "${LOCALSTACK_DOCKER_NAME-localstack_main}" network_mode: bridge ports: - "127.0.0.1:4510-4559:4510-4559" # external service port range - "127.0.0.1:4566:4566" # LocalStack Edge Proxy environment: - SERVICES=lambda
The cause is exactly because of this environment variable, if you set like "SERVICES=lambda" then localstack won't accept cloudformation files generated by serverless because cloudformation is now disabled in this case, so delete that or add "cloudformation" to the SERVICES var would help.
Closing the ticket due to inactivity.
The issue should be resolved when using the latest localstack version (SERVICES configuration should not be required anymore).
Please reach out if you still encounter any issues.