sam build
копирует всю папку проекта вместо лямбда-папок функций.
У меня есть такая структура проекта:
.
├── aws.yaml
├── package.json
├── package-lock.json
└── src
├── postAuthentication
│ └── main.js
└── postConfirmation
└── main.js
Мой шаблон sam (cloudformation) выглядит следующим образом ( сокращенно):
LambdaPostAuthentication:
Type: AWS::Serverless::Function
Properties:
Runtime: nodejs12.x
CodeUri: ./src/postAuthentication
Handler: ./src/postAuthentication/main.handler
LambdaPostConfirmation:
Type: AWS::Serverless::Function
Properties:
Runtime: nodejs12.x
CodeUri: ./src/postConfirmation
Handler: ./src/postConfirmation/main.handler
sam build
дает мне:
.
└── build
├── LambdaPostAuthentication
│ ├── package.json
│ ├── node_modules
│ └── src
│ ├── postAuthentication
│ │ └── main.js
│ └── postConfirmation
│ └── main.js
├── LambdaPostConfirmation
│ ├── package.json
│ ├── node_modules
│ └── src
│ ├── postAuthentication
│ │ └── main.js
│ └── postConfirmation
│ └── main.js
└── template.yaml
Я ожидаю получить следующее:
.
└── build
├── LambdaPostAuthentication
│ ├── package.json
│ ├── node_modules
│ └── src
│ └── postAuthentication
│ └── main.js
├── LambdaPostConfirmation
│ ├── package.json
│ ├── node_modules
│ └── src
│ └── postConfirmation
│ └── main.js
└── template.yaml
Я также пробовал абсолютные пути для CodeUri
и Handler
, но безрезультатно.