class AwsPlatformResources implements PlatformResources {

    @Override
    public CloudAccessConfigs accessConfigs(CloudCredential cloudCredential, Region region, Map<String, String> filters) {
        CloudAccessConfigs cloudAccessConfigs = new CloudAccessConfigs(new HashSet<>());
        AwsCredentialView awsCredentialView = new AwsCredentialView(cloudCredential);
        AmazonIdentityManagement client = awsClient.createAmazonIdentityManagement(awsCredentialView);
        String accessConfigType = filters.get(ACCESS_CONFIG_TYPE);
        Set<CloudAccessConfig> cloudAccessConfigSet;
        if (AwsAccessConfigType.ROLE.name().equals(accessConfigType)) {
            cloudAccessConfigSet = getAccessConfigByRole(client);
        } else {
            cloudAccessConfigSet = getAccessConfigByInstanceProfile(client);
        }
        cloudAccessConfigs.getCloudAccessConfigs().addAll(cloudAccessConfigSet);
        return cloudAccessConfigs;
    }

}