我们正在使用aws codestar创建项目。这些都很好。但从今天开始,我们面临以下问题:
无法上传工件没有GetCompanyRecords资源的CodeUri参数引用。
zip不支持1980年以前的时间戳
现在,当我再次移除aws-sdk模块时,它工作正常。但是当我再次添加它时,构建失败。我非常担心这个。这是我的lambda函数。
GetCompanyRecords:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs6.10
Role:
Fn::ImportValue:
!Join ['-', [!Ref 'ProjectId', !Ref 'AWS::Region', 'LambdaTrustRole']]
Timeout: 10
Events:
PostEvent:
Type: Api
Properties:
Path: /getCompanyRecords
Method: post
提前致谢
答案 0 :(得分:2)
目前,补丁修复了我的问题:
在&nbsp install'
之后,我将以下行添加到buildspec.yml-ls $ CODEBUILD_SRC_DIR
-find $ CODEBUILD_SRC_DIR / node_modules -mtime +10950 -exec touch {};
因为我只是通过添加aws-sdk来解决问题,所以我希望aws解决这个问题。我真的很失望,aws-sdk没有使用aws ..
答案 1 :(得分:1)
您忘记了使用git :)初始化代码库。这意味着它正在尝试从git的头部创建一个zip文件,但失败
rm -rf .git
git init
git add .
git commit -am 'First commit'