Move mock_ec2 decorator back to functions