aws-toolkit-vscode: "Deploy SAM Application": Cannot build layer dependencies: "[Errno 30] Read-only file system"
Describe the bug
When use VS Command Deploy SAM Application with dependencies layer,
build status is failed.
However, deploy process was continuing and create insufficient layer object(only requirements.txt file)
execution log is in additional context.
failed reason is [Errno 30] Read-only file system: '.aws-sam'.
when run command without AWS-ToolKit as below, dependencies ware resolved and create layer.
mkdir -p /tmp/aws-toolkit-vscode/samDeploytpFy2M/build
/usr/local/bin/sam build --build-dir /tmp/aws-toolkit-vscode/samDeploytpFy2M/build --template /Users/<USERNAME>/git/sam_test/lambda-python3.9/template.yaml
template.yml
Resources:
HelloWorldFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: hello_world/
Handler: app.lambda_handler
Runtime: python3.9
Architectures:
- x86_64
Layers:
- !Ref MyLayer
Events:
HelloWorld:
Type: Api
Properties:
Path: /hello
Method: get
MyLayer:
Type: AWS::Serverless::LayerVersion
Properties:
Description: Layer description
ContentUri: my_layer/
CompatibleRuntimes:
- python3.9
Metadata:
BuildMethod: python3.9
my_layer/requirements.txt has only line: requests
To Reproduce
Steps to reproduce the behavior:
- create python SAM Application template with layer
- Add
requirements.txtin layer directory - run VS Command
Deploy SAM Application
Expected behavior Build requirements.txt dependencies and create layer
Desktop (please complete the following information):
- OS: Darwin x64 20.6.0
- Visual Studio Code Extension Host Version: 1.63.2
- AWS Toolkit Version: 1.34.
Additional context
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 19 (8 by maintainers)
https://github.com/aws/aws-toolkit-vscode/pull/2755 is a potential solution though it would be very helpful if anyone experiencing this problem could try out the fix:
Extensions: Install from VSIX...command to install the VSIX.@JadenSimon
I too confirm that the above VSIX allows me to, once again, successfully use debugging with
aws-sam-cli v1.53.0. Thanks!I take it this AWS Toolkit preview will simply be overwritten once the official
1.46.0version is released? Thanks!AWS Toolkit 1.46 includes a fix for this.
Yeah it should, at least from my experience. If it doesn’t do it automatically then you can manually upgrade using the extensions tab.
@JadenSimon
For my issue (that I wrongly posted here) that’s somewhat related to this one, I just wanted to let you know that rolling back to
aws-sam-cli 1.52.0fixed the issue for me. Thanks!