You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<snip>
Action=RunInstances&ClientToken=<REDACTED>
&ImageId=ami-XXX
&InstanceType=t3a.micro
&MaxCount=1
&MinCount=1
&NetworkInterface.1.Description=testing123
&NetworkInterface.1.SubnetId=subnet-XXX
&Version=2016-11-15
2021/04/11 23:13:42 operation error EC2: RunInstances, https response error StatusCode: 400, RequestID: <REDACTED>, api error InvalidParameterValue: Each network interface requires a device index.
exit status 1
(formatted with line breaks)
As seen from above, the AssociatePublicIpAddress and DeviceIndex parameters are omitted from the API call, making this API call invalid.
Didn't test thoroughly for other methods, but CreateLaunchTemplate also has the same problem.
Related issue #1203 also shows AuthorizeSecurityGroupIngress exhibiting the same issue.
<snip>
Action=AuthorizeSecurityGroupIngress
&GroupId=sg-XXX
&IpPermissions.1.IpProtocol=tcp
&IpPermissions.1.IpRanges.1.CidrIp=0.0.0.0%2F0
&IpPermissions.1.IpRanges.1.Description=test
&IpPermissions.1.ToPort=65535
&Version=2016-11-15
2021/04/11 23:08:02 operation error EC2: AuthorizeSecurityGroupIngress, https response error StatusCode: 400, RequestID: <REDACTED>, api error InvalidParameterValue: Invalid value 'Must specify both from and to ports with TCP/UDP.' for portRange.
IpPermissions.1.ToPort=0 should be included in the API call parameters, but is omitted by the SDK.
Expected behavior
Zero/false values should not be omitted by the SDK.
From a quick poke around for examples, the EKS UpdateClusterConfigInput takes a pointer (aws.Bool) instead of value, which seems to correctly result in the value being sent in the API call.
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
The SDK incorrectly omits zero/false values on some SDK client methods.
Version of AWS SDK for Go?
1.3.2
Version of Go (
go version
)?go version go1.16.3 windows/amd64
To Reproduce (observed behavior)
Steps to reproduce the behavior (please share code or minimal repo)
Output:
(formatted with line breaks)
As seen from above, the
AssociatePublicIpAddress
andDeviceIndex
parameters are omitted from the API call, making this API call invalid.Didn't test thoroughly for other methods, but
CreateLaunchTemplate
also has the same problem.Related issue #1203 also shows
AuthorizeSecurityGroupIngress
exhibiting the same issue.Output:
IpPermissions.1.ToPort=0
should be included in the API call parameters, but is omitted by the SDK.Expected behavior
Zero/false values should not be omitted by the SDK.
From a quick poke around for examples, the EKS
UpdateClusterConfigInput
takes a pointer (aws.Bool) instead of value, which seems to correctly result in the value being sent in the API call.Additional context
N/A
The text was updated successfully, but these errors were encountered: