diff --git a/moto/ec2/models.py b/moto/ec2/models.py index ee9e20034..a83284ef6 100644 --- a/moto/ec2/models.py +++ b/moto/ec2/models.py @@ -299,6 +299,7 @@ class Instance(BotoInstance, TaggedEC2Resource): self.subnet_id = kwargs.get("subnet_id") self.key_name = kwargs.get("key_name") self.source_dest_check = "true" + self.launch_time = datetime.utcnow().isoformat() self.private_ip_address = kwargs.get('private_ip_address') self.block_device_mapping = BlockDeviceMapping() diff --git a/moto/ec2/responses/instances.py b/moto/ec2/responses/instances.py index 7922f9d99..62456bc87 100644 --- a/moto/ec2/responses/instances.py +++ b/moto/ec2/responses/instances.py @@ -204,7 +204,7 @@ EC2_RUN_INSTANCES = """