Search code examples
aws-lambdagithub-actions

How to use a GitHub repository in AWS Lambda?


I have a repository where there is a fairly spacious structure that I would like to run in AWS Lambda:

my-repository:
  - helper.py
  - main.py

To do this, I want to use GitHub Action which will automatically update the function. Based on this documentation, we can update one file, but is it possible to update the entire repository at once? Or do I need to use container support for AWS Lambda?

https://github.com/marketplace/actions/aws-lambda-deploy


Solution

  • The GitHub action you linked will zip the repository, or a list of files in the repository, creating a Lambda function deployment file, and then deploy that to AWS Lambda. That is the typical way to deploy a Lambda function. You don't need to use container deployment in order to deploy a Lambda function consisting of multiple files.