amazonwebservices/aws-sdk-for-ios — Issue #6: EC2DescribeInstanceAttributeRequest does not generate correct request
Author: jimzhan
Created: 2011-11-02 08:18:42+00:00
State: open

[AmazonLogger verboseLogging];
EC2ModifyInstanceAttributeRequest * request = [EC2ModifyInstanceAttributeRequest new];
[request setInstanceId:self.instanceId];
[request setDisableApiTermination:YES];
[EC2ModifyInstanceAttributeResponse * reponse = [[AWSClientManager EC2] modifyInstanceAttribute:request];

**Generated request**
ec2.amazonaws.com
/
?Action=ModifyInstanceAttribute&DisableApiTermination=true&InstanceId=&

**Error Response (it's a 400 error)**

InvalidRequestThe request received was invalid.5698f99d-72cb-4253-ae14-03c694d69b2b

According to the official EC2 API document, the attribute parameter should be like this attr-name.Value, e.g.
https://ec2.amazonaws.com/?Action=ModifyInstanceAttribute&InstanceId=i-10a64379&Kernel.Value=aki-f70657b2&