class AwsPrivateKeyStore implements PrivateKeyStore {

    @Override
    public PrivateKey getPrivateKey(String service, String serverHostName,
            StringBuilder privateKeyId) {
        
        String bucketName;
        String keyName;
        String keyIdName;
        
        if (ZMS_SERVICE.equals(service)) {
            bucketName = System.getProperty(ATHENZ_PROP_ZMS_BUCKET_NAME);
            keyName = System.getProperty(ATHENZ_PROP_ZMS_KEY_NAME, ATHENZ_DEFAULT_KEY_NAME);
            keyIdName = System.getProperty(ATHENZ_PROP_ZMS_KEY_ID_NAME, ATHENZ_DEFAULT_KEY_ID_NAME);
        } else if (ZTS_SERVICE.equals(service)) {
            bucketName = System.getProperty(ATHENZ_PROP_ZTS_BUCKET_NAME);
            keyName = System.getProperty(ATHENZ_PROP_ZTS_KEY_NAME, ATHENZ_DEFAULT_KEY_NAME);
            keyIdName = System.getProperty(ATHENZ_PROP_ZTS_KEY_ID_NAME, ATHENZ_DEFAULT_KEY_ID_NAME);
        } else {
            LOG.error("Unknown service specified: {}", service);
            return null;
        }
        
        if (bucketName == null) {
            LOG.error("No bucket name specified with system property");
            return null;
        }
        
        PrivateKey pkey = Crypto.loadPrivateKey(getDecryptedData(bucketName, keyName));
        privateKeyId.append(getDecryptedData(bucketName, keyIdName));
        return pkey;
    }

    public  AwsPrivateKeyStore();
    public  AwsPrivateKeyStore(final AmazonS3 s3, final AWSKMS kms);

}