diff --git a/wrapanapi/systems/ec2.py b/wrapanapi/systems/ec2.py index c67d65c1..32903b1a 100644 --- a/wrapanapi/systems/ec2.py +++ b/wrapanapi/systems/ec2.py @@ -201,6 +201,12 @@ def restart(self): self.logger.error("Starting instance '%s' failed or timed out", self.uuid) return stopped and started + def change_type(self, instance_type): + try: + self.raw.modify_attribute(InstanceType={'Value': instance_type}) + return True + except Exception: + return False class StackStates(object): ACTIVE = ['CREATE_COMPLETE', 'ROLLBACK_COMPLETE', 'CREATE_FAILED',