Another question. it seems like secrets are part of lambda’s deployment regardless if they are actually used as env variables on lambda function itself. Is this expected behaviour?
I have this suspicion because I have couple of secrets that are concatenated as value for a secret manager resource I define in cloudformation template. The combined size for these env variables is larger than 4kb which triggers this error
Request must be smaller than 5120 bytes for the UpdateFunctionConfiguration operation
and I don’t use these secret at all as environment variables.