Skip to content

Bug: "DepLayer doesn't have any versions in remote" - layer versions / SyncFlow issue when using sam sync #3945

@Leigh-M

Description

@Leigh-M

After 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.. ?

  1. OS: Ubuntu Linux 22.04
  2. If using SAM CLI, sam --version: 1.51.0
  3. AWS region: eu-west-1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions