Bug: "DepLayer doesn't have any versions in remote" - layer versions / SyncFlow issue when using sam sync
See original GitHub issueAfter upgrading to SAM 1.51.0 - I am seeing a stack error across all my stacks to do with missing dependency layer versions:
After initially running it syncs initially… then you make some changes which you expect to be uploaded to AWS but fails with: “Syncing Layer externalJobsLoadingAPIHandler44912949DepLayer…” “DepLayer doesn’t have any versions in remote”
Steps to reproduce:
sam sync --watch --stack-name external-jobs-loader --region eu-west-1 --parameter-overrides EnvType=dev --debug
Observed result:
2022-06-07 16:31:00,657 | SyncFlow [Lambda Function externalJobsLoadingAPIHandler]: Finished
2022-06-07 16:31:00,710 | Finished syncing Lambda Function externalJobsLoadingAPIHandler.
2022-06-07 16:31:00,814 | SyncFlow [Layer externalJobsLoadingAPIHandler44912949DepLayer]: Setting Up
2022-06-07 16:31:00,820 | Syncing Layer externalJobsLoadingAPIHandler44912949DepLayer...
2022-06-07 16:31:01,121 | Code sync encountered an error.
Traceback (most recent call last):
File "samcli/lib/sync/sync_flow_executor.py", line 335, in _sync_flow_execute_wrapper
File "samcli/lib/sync/sync_flow.py", line 307, in execute
File "samcli/lib/sync/flows/auto_dependency_layer_sync_flow.py", line 72, in set_up
samcli.lib.sync.exceptions.NoLayerVersionsFoundError: external-jobs-lodcdd4f9b-externalJobsLoadingAPI44912949-DepLayer doesn't have any versions in remote.
I did also see a new yellow warning: “CodeTrigger not created as CodeUri or DefinitionUri is missing for externalJobsLoaderApi” - so there appears to be requirement for DefinitionUri applied to an API provisioned in my template.yaml?
But this dependency/ S3 URI should be controlled by SAM I understand… ?
- OS: Ubuntu Linux 22.04
- If using SAM CLI,
sam --version
: 1.51.0 - AWS region: eu-west-1
Issue Analytics
- State:
- Created a year ago
- Comments:13 (6 by maintainers)
Apologies I wrote that 3-4 months ago but did not post it, for some reason it was reposted now. Pls ignore, this is resolved as far as I am aware. Thanks
Ah, disregard, it seems using
--no-dependency-layer
lets me work on both functions fine, there’s no issue with the function that has a dependency included in it.