EC2DescribeInstanceAttributeRequest does not generate correct request
Closed this issue · 1 comments
[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)
InvalidRequest
The 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&
I do not believe this is still an issue, but please feel free to reopen if you can reproduce with the latest version of the SDK.