ingenieux/beanstalker

Invalid security group parameter passed to AWS SDK

Closed this issue · 1 comments

On line 138 of the AbstractBeanstalkMojo class the secuityGroup variable format being passed to the AWS SDK is incorrectly formatted.

final DescribeSecurityGroupsResult describeSecurityGroupsResult = ec2.describeSecurityGroups(new DescribeSecurityGroupsRequest().withGroupIds(securityGroup));

The DescribeSecurityGroupsRequest.withGroupIds method excepts a String array or a String Collection however the variable that is passed in is a comma separated String which throws the following error

com.amazonaws.services.ec2.model.AmazonEC2Exception: Invalid id: "sg-0f8c950bc7329a653,sg-06d4615187690e062" (Service: AmazonEC2; Status Code: 400; Error Code: InvalidGroupId.Malformed; Request ID: b8ccb12b-3c3f-4aac-82e9-0da49d2082d4)
The secuirtyGroup variable should be split into a String array before being used.

Added a PR for this issue.