Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Serverless: Service files not changed. Skipping deployment

After some successful projects, I have deleted the functions inside AWS-lambda, deleted the logs in CloudWatch and the IAM roles. Also deleted the my-service folder from my Documents.

Then I followed the steps in this tutorial in serverless.

Now when I run:

serverless deploy --aws-profile testUser_atWork

where testUser_atWork is one of my profiles to connect in AWS.

I get the follow error:

Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Service files not changed. Skipping deployment...
Service Information
service: my-service
stage: dev
region: us-east-1
stack: my-service-dev
api keys:
  None
endpoints:
  None
functions:
  hello: my-service-dev-hello




//serverless.yml

service: my-service

provider:
  name: aws
  runtime: nodejs6.10


functions:
  hello:
    handler: handler.hello

And this my handler.js

'use strict';

module.exports.hello = (event, context, callback) => {
  const response = {
    statusCode: 200,
    body: JSON.stringify({
      message: 'Go Serverless v1.0! Your function executed successfully!',
      input: event,
    }),
  };

  callback(null, response);

  // Use this code if you don't use the http event with the LAMBDA-PROXY integration
  // callback(null, { message: 'Go Serverless v1.0! Your function executed successfully!', event });
};

I don't understand why it is skipping deployment.

like image 249
IgorAlves Avatar asked Aug 03 '18 18:08

IgorAlves


People also ask

What is meant by serverless deployment?

Serverless is a cloud-native development model that allows developers to build and run applications without having to manage servers. There are still servers in serverless, but they are abstracted away from app development.

How long is serverless deploy?

Each service is usually made up of 12-20 Lambda functions. And a service can easily take 2-4 mins to deploy.

How long does a Lambda take to deploy?

After 10 minutes, the deployment is complete and CodeDeploy signals success to CloudFormation and completes the stack update.

What does serverless deploy command do?

Use serverless deploy function -f my-function when you have made code changes and you want to quickly upload your updated code to your Fn server or cluster. This is the simplest deployment usage possible. With this command Serverless will deploy your service to the configured Fn server.


1 Answers

have you tried : serverless deploy --aws-profile testUser_atWork --force to force it to update the stack?

Otherwise, try deleting the stack in cloudformation, or with the serverless remove command

like image 180
ionut Avatar answered Sep 20 '22 00:09

ionut