在一些成功的项目之后,我删除了AWS-lambda中的函数,删除了CloudWatch中的日志和IAM角色。还删除了my Documents中的my-service文件夹。
然后,我在serverless中遵循了这个tutorial中的步骤。
现在,当我运行时:
serverless deploy --aws-profile testUser_atWork其中testUser_atWork是我在亚马逊网络服务中连接的配置文件之一。
我得到以下错误:
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这是我的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 });
};我不明白为什么它会跳过部署。
发布于 2018-11-09 17:53:13
你有没有尝试过:serverless deploy --aws-profile testUser_atWork --force强制它更新堆栈?
否则,请尝试在cloudformation中或使用serverless remove命令删除堆栈
https://stackoverflow.com/questions/51678005
复制相似问题