For support requests please search or create posts on Serverless Forum: https://forum.serverless.com
carlosandrebp on master
upload email icon (compare)
carlosandrebp on master
Icons update (compare)
carlosandrebp on master
updates animations (compare)
andrepiresbp on master
Updates (compare)
andrepiresbp on master
Update (compare)
Hi all, I'm developing a serverless plugin and my use-case requires me to automatically add resources to the serverless configuration BEFORE variable resolution happens. I used to accomplish this by adding those resources in the plugins constructor by modifying this.serverless.service.resources
but this no longer works since serverless 2.46.0
Is there a more appropriate way to add auto-generated resources to serverless prior to variable resolution? Or alternatively is there a way to manually call variable resolution on an autogenerated resource?
I'm facing this challenge because my plugin auto-generates resources from static files in the repository that contain serverless variables, but aren't directly referenced in serverless.yaml
I am getting the following error. Is there any idea about it? Anyone?
cmdlet Select-String at command pipeline position 1
Supply values for the following parameters:
Path[0]:
Select-String : Cannot bind argument to parameter 'Path' because it is an empty array.
At line:1 char:1
Hello Everyone,
I have recently come across container support for lambda. To my knowledge, I know that serverless framework packages/zips the code and uploads to aws. Does anyone know if serverless framework supports this container workflow ?
By container workflow I mean: When we do serverless deploy
:
Thanks in advance.
Unable to find the reference to layer in resource section, especially when we enable the provisionedConcurrency or functionVersion set to true.
if we remove both provisionedConcurrency or functionVersion in serverless script, same code is working fine without any issues
---
service:
name: rtn
provider:
name: aws
region: us-west-2
stackName: rtn-sls
deploymentBucket:
name: ${self:custom.S3BucketName.${opt:stage}}
maxPreviousDeploymentArtifacts: 10
deploymentPrefix: rtn/deployment
runtime: nodejs12.x
memorySize: 256
timeout: 300
# Lambda Configuration
versionFunctions: false # Lambda Versioning
# X-Ray Configuration
tracing:
lambda: true
custom:
params: ${file(./env/${opt:stage}/parameters.json)}
version: ${self:custom.params.Version}
LayerVersion: ${self:custom.params.LayerVersion}
s3Key: "https://s3.amazonaws.com/${self:custom.S3BucketName.${opt:stage}}/rtn-business-service/${self:custom.version}"
S3BucketName:
devint: rtn-devint
prod: rtn
package:
individually: true
functions:
rtn-api-router:
name: "rtn-api-router"
handler: rtn-api-router.handler
layers:
- !Ref rtnLayer
package:
artifact: "${self:custom.s3Key}/rtn-api-router-v${self:custom.version}.zip"
provisionedConcurrency: 1
resources:
- Resources:
rtnLayer:
Type: AWS::Lambda::LayerVersion
Properties:
CompatibleRuntimes:
- nodejs12.x
Content:
S3Bucket: ${self:custom.S3BucketName.${opt:stage}}
S3Key: common-nodejs-lambda-layer/common-nodejs-lib-v${self:custom.LayerVersion}.zip
LayerName: rtn-layer
Getting below error
Serverless Error ----------------------------------------
ServerlessError: Could not find reference to layer: rtnLayer. Ensure that you are referencing layer defined in your service.
at /Users/naveen/rtn-api-router/node_modules/serverless/lib/plugins/aws/package/compile/functions.js:739:15
at Array.forEach (<anonymous>)
at extractLayerConfigurationsFromFunction (/Users/naveen/rtn-api-router/node_modules/serverless/lib/plugins/aws/package/compile/functions.js:735:29)
at AwsCompileFunctions.compileFunction (/Users/naveen/rtn-api-router/node_modules/serverless/lib/plugins/aws/package/compile/functions.js:458:9)
at /Users/naveen/rtn-api-router/node_modules/serverless/lib/plugins/aws/package/compile/functions.js:680:64
at Array.map (<anonymous>)
at AwsCompileFunctions.compileFunctions (/Users/naveen/rtn-api-router/node_modules/serverless/lib/plugins/aws/package/compile/functions.js:680:37)
at AwsCompileFunctions.tryCatcher (/Users/naveen/rtn-api-router/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/naveen/rtn-api-router/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/Users/naveen/rtn-api-router/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/Users/naveen/rtn-api-router/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/Users/naveen/rtn-api-router/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/Users/naveen/rtn-api-router/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/Users/naveen/rtn-api-router/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/Users/naveen/rtn-api-router/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues (/Users/naveen/rtn-api-router/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:456:21)
Hi all. Any serverless experts out there open to some contract work?
My startup is requiring a 3 months+ contract laying down some initial architecture and implemention in node. Fully serverless stack on AWS.
Details here:
https://docs.google.com/document/d/1bfvfRF6m8HMWuk1rGq14Q5A0Cnypx0KV6ZV4XBQToTg/edit?usp=sharing
Pm for more details
Many thanks
return { statusCode: 200, body: JSON.stringify("") }
in the handler. When I inspect the response I get { statusCode: 200, body: "" } as the body of the response for the request.
integration: lambda
, as in this case the path and query parameters are probably automatically parsed as object and return as properties of event. But this messed up the response returned by the handlers.
Getting "EventBridge rule <rule_name> already exists" error on redeployment
I am using native CF by setting useCloudFormation: true
functions:
eventBridge:
handler: index.receiveEvent
events:
- eventBridge:
eventBus: <ARN of the event bus>
pattern:
source:
- server.name
detail-type:
- EVENT_NAME
Any help or guidance is much appreciated. Ty