Amazon web services AWS代码构建Git连接-仅刷新更新的代码

Amazon web services AWS代码构建Git连接-仅刷新更新的代码,amazon-web-services,aws-codebuild,Amazon Web Services,Aws Codebuild,我正在使用AWS为我的站点打包node10.x lambda代码和依赖项。我的git repo是按函数划分的,因此我有一个专门用于rest auth lambdas的repo作为示例(我仍在积极开发这个,因此有大量缺少的buildspec和函数文件) My git repo具有以下布局: . ├── buildspec │ ├── postmark.yml │ ├── rest-auth-login.yml │ ├── rest-auth-password-link.yml │

我正在使用AWS为我的站点打包node10.x lambda代码和依赖项。我的git repo是按函数划分的,因此我有一个专门用于rest auth lambdas的repo作为示例(我仍在积极开发这个,因此有大量缺少的buildspec和函数文件)

My git repo具有以下布局:

.
├── buildspec
│   ├── postmark.yml
│   ├── rest-auth-login.yml
│   ├── rest-auth-password-link.yml
│   └── rest-auth-register.yml
├── function_code
│   ├── login.js
│   ├── password-link.ext
│   ├── postmark.js
│   ├── register.js
│   └── rgistration-confirm.js
├── .gitignore
└── README.md
现在,当我将更新推送到github时,所有4个buildspec配置都会启动,并在我的S3存储桶中创建4个zip文件,供lambda读取

但是,即使只对其中一个底层代码进行了更改,也会重新创建所有4个zip文件——我知道我可以将每个函数拆分为它自己的repo,但是有没有办法将AWS CodeBuild配置为仅在repo中更改特定文件时才触发给定buildspec的更新

Ie是否仅在
postmark.js
文件更改时运行
postmark.yml

示例
postmark.yml

version: 0.2

phases:
  install:
    runtime-versions:
      nodejs: 10  
    commands:
      - npm install postmark
artifacts:
  files:
    - 'function_code/postmark.js'
    - 'node_modules/**/*'
对。您可以使用“文件路径”选项仅在特定文件更改时触发,如中所述

将以下内容添加到postmark生成的源代码将导致仅在更新postmark.js文件时触发该生成