pplu / aws-sdk-perl

A community AWS SDK for Perl Programmers
Other
171 stars 94 forks source link

Error when callling RunInstances with custom NetworkInterfaces #15

Closed ecolomer closed 7 years ago

ecolomer commented 9 years ago

Hello,

I have been trying to launch an instance using a custom NetworkInterfaces parameter for the RunInstances action. The options this parameter accepts are defined by the InstanceNetworkInterfaceSpecification class. This works for most of the attributes defined in this class but not for the Groups parameter. This is the error I get:

POST Request failed: 400 Bad Request <?xml version="1.0" encoding="UTF-8"?><Response><Errors><Error><Code>UnknownParameter</Code><Message>The parameter Groups is not recognized</Message></Error></Errors><RequestID>b72080f2-40f1-43bf-9a44-811e80df0dd4</RequestID></Response> at aws-sdk-perl/auto-lib/Paws/EC2.pm line 612.

It seems like the Groups parameter is not recognized by AWS, although this is how it is defined in their documentation. Debugging this issue with aws-cli, it seems like the real parameter name used in the URL is SecurityGroupId, instead of Groups.

This is a bit weird, it seems like an inconsistency between what the documentation says and what really works. Is there any way we could fix this in your SDK?

Thanks so much for your answer!

pplu commented 9 years ago

Can you try out with the code in HEAD? I see that the docs are saying that "Groups" should be used, and in theory that's what we're doing, but there was a bug where parameters in lists were not being passed correctly to the API