Hey guys, does anyone have an sample using <functi...
# general
Hey guys, does anyone have an sample using function/sourcecodehash? MY lambdas source are not being updated after uploading new binaries to S3
the doc mentions
which I cannot find anywhere
after some googling I made it work with this hashing method. The outcome is then set to the lambda sourceCodeHash property. Updates worked as expected
Copy code
public static string GetSHA265Base64Checksum(string filename)
			using (var hasher = System.Security.Cryptography.HashAlgorithm.Create("SHA256"))
				using (var stream = System.IO.File.OpenRead(filename))
					var hash = hasher.ComputeHash(stream);
					return Convert.ToBase64String(hash);