# Lambda source\_code\_hash

**URL:** <https://discuss.hashicorp.com/t/lambda-source-code-hash/30407>\
**Category:** Terraform\
**Created:** [October 7, 2021, 3:28pm UTC](https://discuss.hashicorp.com/t/lambda-source-code-hash/30407 "2021-10-07T15:28:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![daski](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/daski/32/16633_2.png) [@daski](https://discuss.hashicorp.com/u/daski)\
**Post date:** [October 7, 2021, 3:28pm UTC](https://discuss.hashicorp.com/t/lambda-source-code-hash/30407/1 "2021-10-07T15:28:18Z")

</div>

[https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda\_function#source\_code\_hash](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function#source_code_hash)

could somebody provide equivalent of `filebase64sha256("file.zip")` however using S3? seems to be missing in docs, some solutions I found use s3 object - but this is when you use terraform to manage the file, I want to detect change of file without versioning on in s3

does it needs only s3\_bucket, s3\_key and source\_code\_hash = filebase64sha256(s3\_key) - seems to be not working and looking for local file … how to pass s3\_key to function?
