class EC2RaiderImpl implements EC2Raider {

    @Override
    public List<String> getSecurityGroups(String instanceId) {
        if (instanceId.isEmpty() || instanceId == null) {
            throw new InvalidInputDataException("Empty/Null instanceId provided in request");
        }

        List<String> secGroupIds = new ArrayList<String>();
        List<GroupIdentifier> groups = ec2Delegator.getEc2().describeInstanceAttribute(new DescribeInstanceAttributeRequest().withAttribute("groupSet").withInstanceId(instanceId)).getInstanceAttribute().getGroups();
        groups.forEach(group -> secGroupIds.add(group.getGroupId()));
        return secGroupIds;
    }

    public  EC2RaiderImpl();

}