zip 不支持 1980 之前的时间戳 aws
zip does not support timestamps before 1980 aws
我们正在使用 aws codestar 创建项目。这些工作正常。但从今天开始我们面临以下问题:
Unable to upload artifact None referenced by CodeUri parameter of GetCompanyRecords resource.
zip does not support timestamps before 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
提前致谢
目前以下补丁解决了我的问题:
我在 'npm install'
之后向 buildspec.yml 添加了以下行
-ls $CODEBUILD_SRC_DIR
-查找 $CODEBUILD_SRC_DIR/node_modules -mtime +10950 -exec touch {} ;
因为我只是通过添加 aws-sdk 遇到了问题,所以我希望 aws 解决这个问题。我真的很失望 aws-sdk 没有使用 aws..
您忘记使用 git:) 初始化代码库。这意味着它正在尝试从 git 的头部创建一个 zip 但失败了
rm -rf .git
git init
git add .
git commit -am 'First commit'
我们正在使用 aws codestar 创建项目。这些工作正常。但从今天开始我们面临以下问题:
Unable to upload artifact None referenced by CodeUri parameter of GetCompanyRecords resource.
zip does not support timestamps before 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
提前致谢
目前以下补丁解决了我的问题:
我在 'npm install'
之后向 buildspec.yml 添加了以下行-ls $CODEBUILD_SRC_DIR
-查找 $CODEBUILD_SRC_DIR/node_modules -mtime +10950 -exec touch {} ;
因为我只是通过添加 aws-sdk 遇到了问题,所以我希望 aws 解决这个问题。我真的很失望 aws-sdk 没有使用 aws..
您忘记使用 git:) 初始化代码库。这意味着它正在尝试从 git 的头部创建一个 zip 但失败了
rm -rf .git
git init
git add .
git commit -am 'First commit'