class AwsEC2Platform extends Platform implements SshBasedExperiment<AwsEC2Container> {

    public void setSecurityGroupIds (String networkInterfaceId, Collection<String> securityGroupIds) {
        try {
            log.debug("Setting security groups for interface {} to {}", networkInterfaceId, securityGroupIds);
            amazonEC2.modifyNetworkInterfaceAttribute(new ModifyNetworkInterfaceAttributeRequest().withNetworkInterfaceId(networkInterfaceId)
                                                                                                  .withGroups(securityGroupIds));
        } catch (AmazonEC2Exception e) {
            if (SECURITY_GROUP_NOT_FOUND.equals(e.getErrorCode())) {
                log.warn("Tried to set invalid security groups. Pruning out Chaos Security Group Map");
                processInvalidGroups(securityGroupIds);
            }
            throw new ChaosException(AWS_EC2_GENERIC_API_ERROR, e);
        }
    }

    @Autowired  AwsEC2Platform(AmazonEC2 amazonEC2, ContainerManager containerManager, AwsEC2SelfAwareness awsEC2SelfAwareness);
    private  AwsEC2Platform();

}