AWSLambda - Do not pickle reproducible Docker-client (#5615)

This commit is contained in:
Bert Blommers 2022-10-29 13:26:19 +00:00 committed by GitHub
parent a49222fc15
commit a370362143
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -494,6 +494,13 @@ class LambdaFunction(CloudFormationModel, DockerModel):
self._aliases: Dict[str, LambdaAlias] = dict()
def __getstate__(self) -> Dict[str, Any]:
return {
k: v
for (k, v) in self.__dict__.items()
if k != "_DockerModel__docker_client"
}
def set_version(self, version: int) -> None:
self.function_arn = make_function_ver_arn(
self.region, self.account_id, self.function_name, version