Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

sls deploy function doesn't create new requirements layer version #700

@brettdh

Description

@brettdh

I have a Django app that I want to deploy in these steps:

  1. Deploy a single function, manage, that is used for running (you guessed it) manage.py commands
  2. Run the manage function to run Django migrations
  3. Deploy the rest of the functions in my Django app

When I attempt (1), though, using sls deploy function -f manage, I notice that in step (2), a new dependency I just added to my requirements.txt (since the last deploy of the manage function) isn't available in the manage function. Further, I'm using layer: true in my serverless.yml, and I noticed that a new Lambda layer version was not created when i ran step (1) - which explains the missing dependency.

How can I continue using a Lambda layer for my Python requirements, while making sure that deploying a single function includes a new version of the requirements layer if needed? Is this a bug in serverless-python-requirements?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions