Home > Mobile >  how to generate zip file for lambda via terrarform?
how to generate zip file for lambda via terrarform?

Time:04-26

I am working on a aws stack and have some lambdas and s3 bucket ( sample code below) . how to generate zip file for lambda via terrarform. I have seen different styles and probably depends on the version of terraform as well.

resource "aws_lambda_function" "my_lambda" {
              filename = "my_lambda_func.zip"
              source_code_hash = filebase64sha256("my_lambda_func.zip")

CodePudding user response:

Using archive_file would be most common. You can zip individual files or entire folders, depending how your lambda function is developed.

  • Related