Terraform lambda source_code_hash update with same code

前端 未结 4 599
抹茶落季
抹茶落季 2021-01-04 07:27

I have an AWS Lambda deployed successfully with Terraform:

resource \"aws_lambda_function\" \"lambda\" {
  filename                       = \"dist/subscriber         


        
4条回答
  •  被撕碎了的回忆
    2021-01-04 07:59

    This is because you are hashing just main.py but uploading dist/subscriber-lambda.zip. Terraform compares the hash to the hash it calculates when the file is uploaded to lambda. Since the hashing is done on two different files, you end up with different hashes. Try running the hash on the exact same file that is being uploaded.

提交回复
热议问题