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)
We have 2-factor authentication set up in the AWS account. sls deploy command thus asks for the MFA code. How to run the deployment in non-interactive mode when MFA is enabled?
For ex:
lerna run
command does not support user input. Similarly, if this was to run in CI/CD, interactivity won’t be possible. How is this handled. What’s the best way to manage this in serverless framework with sls deploy command?
Did you add AWS as a provider on serverless? I also have 2-factor on but have never been asked to provide an MFA code when deploying
👋 Hi everyone! We’re excited to announce that ⚡️ Serverless Desktop ⚡️ is in beta. Check it out here: https://github.com/serverless/desktop
Serverless Desktop is a GUI client designed to streamline your Serverless dev workflow. A few highlights:
We would love your feedback to help us build something you love. Please take 2 minutes to answer these 4 questions.
Serverless: Configuration warning:
Serverless: at 'service': unrecognized property 'package'
Serverless: at 'resources.Resources.SPoGOrderManagementUpdateQueue.DependsOn': should be array
Serverless: at 'resources.Resources.SPoGOrderManagementCreateQueue.DependsOn': should be array
Serverless: at 'resources.Resources.SPoGOrderManagementAckPaymentInfoQueue.DependsOn': should be array
Hi guys so i found this error while trying to sls deploy .i don't know what this could be .Has anyone had any issue like this?
hi All, I am wondering if you might be able to help with a problem of custom _env files not getting their values read?
deploy linesls deploy --region ca-central-1 --stage dev
serverless.ymlcustom: ${{file(serverless/config/custom_${{self:provider.stage}}.yml)}}
custom_dev.ymlAPPLE_AUTH_METHOD: get this from Apple/Miguel
APPLE_PVT_KEY: get this from Apple/Miguel
service.yml
SnsGoogleAlertPinpointChannel:
Type: AWS::Pinpoint::GCMChannel
Description: Google (Android) SNS Push Notifications Channel for sending Alerts and Notifications to the user
Properties:
ApiKey: ${{self:provider.environment.GOOGLE_API_KEY}}
ApplicationId: ${{self:provider.environment.PP_APP_NAME}}
Enabled: true
Hi All, I have a problem that you might be able to help with.
simple helloworld type nodejs endpoint using serverless-bundle.
This fails when using yarn or npm as the custom.bundle.packager.
`Serverless: Bundling with Webpack...
Serverless: Fetch dependency graph from /home/michael/work/serverless/sls-course/notes-api/package.json
Error --------------------------------------------------
Error: yarn list --depth=1 --json --production failed with code 1
at ChildProcess.<anonymous> (../notes-api/node_modules/serverless-webpack/lib/utils.js:91:16)`
or
`Serverless: Bundling with Webpack...
Serverless: Fetch dependency graph from ../notes-api/package.json
Syntax Error -------------------------------------------
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at ../notes-api/node_modules/serverless-webpack/lib/packagers/npm.js:70:49`
Your Environment Information ---------------------------
Operating System: linux
Node Version: 12.19.0
Framework Version: 2.28.6
Plugin Version: 4.4.3
SDK Version: 2.3.2
Components Version: 3.7.2
the addition of the serverless-bundle it fails when not present it deploys ok.
Any Ideas?
module.exports.app2 = async event => {
return {
statusCode: 200,
body: JSON.stringify(
{
message: 'Go Serverless v1.0! Your function executed successfully!',
input: event,
},
null,
2
),
};
Hello,
I'm using serverless version 2.29.0 . I have a monorepo (yarn workspaces) project with multiple microservices. Each microservice has it own serverless.yml config file.
and I have a serverless-common.yml in root of the monorepo referenced by all my microservices I have a lot of redundant variables which i have refactored in this common config file . Today when I run deploy I have a warning like shown below.This will be an error from serverless v3.
Is there any clean workaround to share common variables across all services ?
Cannot resolve serverless.yml: Variables resolution errored with:
- Cannot resolve variable at "provider.stage": Cannot load file from outside of service folder,
- Cannot resolve variable at "provider.runtime": Cannot load file from outside of service folder,
- Cannot resolve variable at "provider.region": Cannot load file from outside of service folder,
- Cannot resolve variable at "provider.profile": Cannot load file from outside of service folder,
- Cannot resolve variable at "provider.deploymentBucket.name": Cannot load file from outside of service folder,
- Cannot resolve variable at "provider.logRetentionInDays": Cannot load file from outside of service folder,
- Cannot resolve variable at "custom.output.file": Cannot load file from outside of service folder
As running the app from CI-CD pipeline, a profile is not being passed in the argument assuming the pipeline has the required permissions through the role.
My deployment-role.yml file has a policy that looks as follows:
DeploymentPolicy:
Type: AWS::IAM::Policy
Properties:
PolicyName: deployment-policy
PolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Action:
- 'cloudformation:*'
- 'iam:*'
- 'lambda:*'
- 'ecs:*'
- 'ecr:*'
- 'logs:*'
- 'ssm:*'
- 'acm:*'
- 'apigateway:*'
- 'application-autoscaling:*'
- 'autoscaling:*'
- 'cloudfront:*'
- 'cloudwatch:*'
- 'elasticache:*'
- 'elasticloadbalancing:*'
- 'events:*'
- 'route53:*'
- 'sns:*'
- 'sqs:*'
- 's3:*'
- 'dynamodb:*'
- 'xray:*'
- 'cognito-idp:*'
Resource: '*'
Roles:
- !Ref DeploymentRole
-
Given the policy has full access to s3, I expected the deployment to go through but it fails with the following error message:
326 | lerna info ci enabled
327 | lerna info Executing command in 4 packages: "npm run deploy"
328 | vlncc-sns: > vlncc-sns@0.1.0 deploy
329 | vlncc-sns: > sls deploy -v
330 | tenant-mgmt-service: > tenant-mgmt-service@0.1.0 deploy
331 | tenant-mgmt-service: > sls deploy -v
332 | vlncc-sns: Serverless: Deprecation warning: Variables resolver reports following resolution errors:
333 | vlncc-sns: - Cannot resolve variable at "provider.profile": Value not found at "opt" source
334 | vlncc-sns: From a next major it we will be communicated with a thrown error.
335 | vlncc-sns: Set "variablesResolutionMode: 20210219" in your service config, to adapt to this behavior now
336 | vlncc-sns: More Info: https://www.serverless.com/framework/docs/deprecations/#NEW_VARIABLES_RESOLVER
337 | tenant-mgmt-service: Serverless: Deprecation warning: Variables resolver reports following resolution errors:
338 | tenant-mgmt-service: - Cannot resolve variable at "provider.profile": Value not found at "opt" source,
339 | tenant-mgmt-service: - Cannot resolve variable at "provider.iamRoleStatements.0": Cannot load file from outside of service folder
340 | tenant-mgmt-service: From a next major it we will be communicated with a thrown error.
341 | tenant-mgmt-service: Set "variablesResolutionMode: 20210219" in your service config, to adapt to this behavior now
342 | tenant-mgmt-service: More Info: https://www.serverless.com/framework/docs/deprecations/#NEW_VARIABLES_RESOLVER
343 | vlncc-sns:
344 | vlncc-sns: Serverless Warning --------------------------------------
345 | vlncc-sns:
346 | vlncc-sns: A valid option to satisfy the declaration 'opt:profile' could not be found.
347 | vlncc-sns:
348 | vlncc-sns: Serverless: Packaging service...
349 | vlncc-sns: Serverless: Creating Stack...
350 | tenant-mgmt-service:
351 | tenant-mgmt-service: Serverless Warning --------------------------------------
352 | tenant-mgmt-service:
353 | tenant-mgmt-service: A valid option to satisfy the declaration 'opt:profile' could not be found.
354 | tenant-mgmt-service:
355 | vlncc-sns: Serverless: Checking Stack create progress...
356 | tenant-mgmt-service: Serverless: Configuration warning at 'functions.getPool.events[0].http': unrecognized property 'documentation'
357 | tenant-mgmt-service: Serverless:
358 | tenant-mgmt-service: Serverless: Learn more about configuration validation here: http://slss.io/configuration-validation
359 | tenant-mgmt-service: Serverless:
360 | tenant-mgmt-service: Serverless: Deprecation warning: Starting with version 3.0.0, following property will be replaced:
361 | tenant-mgmt-service: "provider.iamRoleStatements" -> "provider.iam.
`Serverless: Uploading file at '/Users/.../serverless/azure-example/.serverless/azure-example-ds.zip' to container 'deployment-artifacts' with name 'samplewus2devazureexampleds-ARTIFACT-xxx.zip'
Fetch Error ---------------------------------------------
FetchError: request to https://xxxx.blob.core.windows.net/deployment-artifacts/samplewus2devazureexampleds-ARTIFACT-t1616273156752.zip?blockid=xxxxx&comp=block failed, reason: write EPIPE
Looks like serverless can't upload the zipped files to the blob storage. Any idea why?
org: zeeshanemallates
app: my-lambda-app
name: aws-lambda-starter
component: aws-lambda
provider:
name: aws
runtime: nodejs14.x
stage: dev
region: us-east-2
inputs:
src: ./src
handler: handler.handler
Type Error ---------------------------------------------
TypeError: Cannot read property 'pipesCount' of undefined
at ReadStream.Readable.pipe (_stream_readable.js:637:13)
at Readable.<anonymous> (/opt/atlassian/pipelines/agent/build/node_modules/lazystream/lib/lazystream.js:33:12)
at Readable.instance.<computed> (/opt/atlassian/pipelines/agent/build/node_modules/lazystream/lib/lazystream.js:18:14)
at Readable.read (/opt/atlassian/pipelines/agent/build/node_modules/readable-stream/lib/_streamreadable.js:443:10)
at resume (/opt/atlassian/pipelines/agent/build/node_modules/readable-stream/lib/_stream_readable.js:790:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: linux
Node Version: 12.20.1
Framework Version: 2.17.0 (local)
Plugin Version: 4.5.1
SDK Version: n/a
Components Version: 3.7.5