diff --git a/moto/ec2/models.py b/moto/ec2/models.py index c7467feee..6ed6e9af0 100755 --- a/moto/ec2/models.py +++ b/moto/ec2/models.py @@ -369,6 +369,7 @@ class Instance(TaggedEC2Resource, BotoInstance): self.key_name = kwargs.get("key_name") self.source_dest_check = "true" self.launch_time = utc_date_and_time() + self.disable_api_termination = kwargs.get("disable_api_termination", False) associate_public_ip = kwargs.get("associate_public_ip", False) if in_ec2_classic: # If we are in EC2-Classic, autoassign a public IP diff --git a/moto/ec2/responses/instances.py b/moto/ec2/responses/instances.py index 4da7b880f..368302235 100644 --- a/moto/ec2/responses/instances.py +++ b/moto/ec2/responses/instances.py @@ -297,7 +297,7 @@ EC2_RUN_INSTANCES = """