【发布时间】:2019-01-11 15:57:13
【问题描述】:
在一些成功的项目之后,我删除了 AWS-lambda 中的函数,删除了 CloudWatch 中的日志和 IAM 角色。
还从我的文档中删除了my-service 文件夹。
然后我在无服务器中按照tutorial 中的步骤操作。
现在当我跑步时:
serverless deploy --aws-profile testUser_atWork
其中 testUser_atWork 是我在 AWS 中连接的配置文件之一。
我收到以下错误:
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 });
};
我不明白它为什么跳过部署。
【问题讨论】:
标签: deployment serverless-framework