You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using a template with AWS::Serverless::LayerVersion and BuildMethod: makefile fails building because tha makefile passed to make command seems wrong. The code aws_lambda_builders/workflows/custom_make/actions.py", line 99 is using variable manifest_path which is a dependency manifest not the makefile
Steps to reproduce:
template.yaml
AWSTemplateFormatVersion : '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: A sample SAM template for deploying Lambda functions.
2023-11-04 12:53:36,389 | CustomMakeBuilder:CopySource succeeded
2023-11-04 12:53:36,390 | LibsLayer: Running CustomMakeBuilder:MakeBuild
2023-11-04 12:53:36,391 | LibsLayer: Current Artifacts Directory : /tmp/aws-toolkit-vscode/vsctkChoBiG/output/LibsLayer
2023-11-04 12:53:36,392 | executing Make: ['make', '--makefile', '/tmp/aws-toolkit-vscode/vsctkChoBiG/debug-requirements.txt', 'build-LibsLayer']
2023-11-04 12:53:36,402 | CustomMakeBuilder:MakeBuild failed
Traceback (most recent call last):
File "aws_lambda_builders/workflows/custom_make/actions.py", line 99, in execute
File "aws_lambda_builders/workflows/custom_make/make.py", line 115, in run
aws_lambda_builders.workflows.custom_make.make.MakeExecutionError: Make Failed: make: *** No rule to make target 'build-LibsLayer'. Stop.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "aws_lambda_builders/workflow.py", line 371, in run
File "aws_lambda_builders/workflows/custom_make/actions.py", line 109, in execute
aws_lambda_builders.actions.ActionFailedError: Make Failed: make: *** No rule to make target 'build-LibsLayer'. Stop.
I can build the app using sam commands using the template.
The problem happens when I try to use vscode debugger. The launch.json uses the template as expected creating the build dir, copying files and building the command as:
The manifest is modified by debugger including debugpy for debugging.
From my point of view the problem is that the CustomMakeBuilder is trying to read the manifest as a makefile when --manifest is passed to the build command. If Idon´t use the arguments, it works, but debugging is not enabled.
Description:
Using a template with AWS::Serverless::LayerVersion and BuildMethod: makefile fails building because tha makefile passed to make command seems wrong. The code aws_lambda_builders/workflows/custom_make/actions.py", line 99 is using variable manifest_path which is a dependency manifest not the makefile
Steps to reproduce:
template.yaml
AWSTemplateFormatVersion : '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: A sample SAM template for deploying Lambda functions.
Resources:
LibsLayer:
Type: AWS::Serverless::LayerVersion
Properties:
ContentUri: ../../layerlibs/
CompatibleRuntimes:
- python3.11
Metadata:
BuildMethod: makefile
/usr/local/bin/sam build --build-dir /tmp/aws-toolkit-vscode/vsctkChoBiG/output --template /home/user/github/LambdAtom/atom_vmaas/.vscode/template.yml --manifest /tmp/aws-toolkit-vscode/vsctkChoBiG/debug-requirements.txt --debug
Observed result:
2023-11-04 12:53:36,389 | CustomMakeBuilder:CopySource succeeded
2023-11-04 12:53:36,390 | LibsLayer: Running CustomMakeBuilder:MakeBuild
2023-11-04 12:53:36,391 | LibsLayer: Current Artifacts Directory : /tmp/aws-toolkit-vscode/vsctkChoBiG/output/LibsLayer
2023-11-04 12:53:36,392 | executing Make: ['make', '--makefile', '/tmp/aws-toolkit-vscode/vsctkChoBiG/debug-requirements.txt', 'build-LibsLayer']
2023-11-04 12:53:36,402 | CustomMakeBuilder:MakeBuild failed
Traceback (most recent call last):
File "aws_lambda_builders/workflows/custom_make/actions.py", line 99, in execute
File "aws_lambda_builders/workflows/custom_make/make.py", line 115, in run
aws_lambda_builders.workflows.custom_make.make.MakeExecutionError: Make Failed: make: *** No rule to make target 'build-LibsLayer'. Stop.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "aws_lambda_builders/workflow.py", line 371, in run
File "aws_lambda_builders/workflows/custom_make/actions.py", line 109, in execute
aws_lambda_builders.actions.ActionFailedError: Make Failed: make: *** No rule to make target 'build-LibsLayer'. Stop.
Build Failed
Expected result:
['make', '--makefile', '/home/user/github/LambdAtom/layerlibs/Makefile', 'build-LibsLayer']
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: SAM CLI, version 1.100.0Add --debug flag to any SAM CLI commands you are running
The text was updated successfully, but these errors were encountered: