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! We're trying to migrate from the v2 variable resolvers to the new v3 variable resolver engine. I'm struggling with how to return "undefined" values (i.e. my resolver can't resolve).
If I return { value: undefined }
, serverless gives error:
Source "xyz" returned not supported result: "undefined"
If I return just undefined
(i.e. not wrapped in { value }), serverless gives error:
Unexpected "xyz" source result: undefined
If I return { value: null }
, serverless gives error:
Value not found at "xyz" source
For context, I want to use this to pass an optional parameter:
MyLayer:
Type: AWS::Lambda::LayerVersion
Properties:
Content:
S3Bucket: ${myresolver:bucket, ''}
S3Key: ${myresolver:key, ''}
S3ObjectVersion: ${myresolver:objectVersion}
Hi all, does anyone know if it's possible to have conditional resources defined, based on the stage?
The use case is that prod and staging stages use a VPC, but dev does not. I am creating a Security Group under resources, which is what I want to make conditional based on the stage.
stage
parameter resolved in serverless? I see that it can be passed to both the package and deploy command, but it seems to be injected during packaging. Is it possible to have this resolved at deploy-time, to enable build-once + promote artifact deployments?
node:899) ExperimentalWarning: The fs.promises API is experimental
Type Error [ E R R_ I N V A L I D_ A R G_ T Y P E] ------
TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type Function. Received type undefined
at promisify (internal/util.js:256:11)
at Object.<anonymous> (/usr/lib/node_modules/serverless/node_modules/compress-brotli/src/index.js:9:18)
```package main
import (
"context"
"log"
"os"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
)
// Handler is our lambda handler invoked by the lambda.Start
function call
func Handler(ctx context.Context, sqsEvent events.SQSEvent) error {
log.Println("SQS Event", sqsEvent)
for _, v := range sqsEvent.Records {
log.Println(v.Body)
}
return nil
}
func main() {
lambda.Start(Handler)
} ```
Error: Call argument for function sf-2-at-pipeline-2-dev-salesforce is not a valid JSON object
at Gaxios._request (/Users/eugene.aiken/sf_2_at_pipeline/node_modules/gaxios/build/src/gaxios.js:129:23)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async UserRefreshClient.requestAsync (/Users/eugene.aiken/sf_2_at_pipeline/node_modules/google-auth-library/build/src/auth/oauth2client.js:343:18)
Is Fargate still the best way to run long-running, resource intensive background tasks? I found this post, but it's from 2018.
How are people doing this today?