I have been struggling with deploying this serverless lambda as it keeps failing in circleci with the below error:
× Uncaught exception
Environment: linux, node 14.20.0, framework 3.24.0 (local), plugin 6.2.2, SDK 4.3.2
Credentials: Local, environment variables
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues
Error:
The security token included in the request is invalid.
2 deprecations found: run 'serverless doctor' for more details
make: *** [provision] Error 1
Exited with code exit status 2
CircleCI received exit code 2
and i am not sure what token circleci is passing during the request.
I am running the below commands for the deployment on my makefile
serverless config credentials --provider aws --key ${AWS_ACCESS_KEY_ID} --secret ${AWS_SECRET_ACCESS_KEY}
sls remove --verbose
serverless deploy --aws-s3-accelerate --stage ci${CIRCLE_BUILD_NUM} --verbose
and below is my yaml file config:
service: enterprise-tools
frameworkVersion: ">=1.1.0 <4.0.0"
provider:
name: aws
runtime: nodejs14.x
role: ${env:AWS_ROLE}
stage: ${env:STAGE, 'dev'}
region: eu-west-1
memorySize: 128
environment:
SPLUNK_HEC_TOKEN: ${env:SPLUNK_HEC_TOKEN, ''}
SPLUNK_HEC_URL: ${env:SPLUNK_HEC_URL, ''}
SPLUNK_LOG_LEVEL: ${env:SPLUNK_LOG_LEVEL, ''}
NODE_ENV: ${env:NODE_ENV, 'production'}
functions:
deployMe:
handler: lambdas/deployMe.handler
events:
- http:
path: deployMe
method: post
# resources:
plugins:
- serverless-offline
package:
exclude:
- docs/**
- test/**
packages:
"serverless": "^3.24.0",
"serverless-offline": "^11.2.3"
Thank you in advance.