diff --git a/lib/plugins/aws/info/getApiKeyValues.js b/lib/plugins/aws/info/getApiKeyValues.js index eaed66577061..6b7ac5daf60b 100644 --- a/lib/plugins/aws/info/getApiKeyValues.js +++ b/lib/plugins/aws/info/getApiKeyValues.js @@ -51,9 +51,12 @@ module.exports = { }) .then((apiKeys) => { if (apiKeys && apiKeys.length) { - info.apiKeys = apiKeys.map((apiKey) => - _.pick(apiKey, ['name', 'value', 'description', 'customerId']) - ); + info.apiKeys = apiKeys.map((apiKey) => ({ + name: apiKey.name, + value: apiKey.value, + description: apiKey.description, + customerId: apiKey.customerId, + })); } return BbPromise.resolve(); }); diff --git a/test/unit/lib/plugins/aws/info/getApiKeyValues.test.js b/test/unit/lib/plugins/aws/info/getApiKeyValues.test.js index 9417eb58b886..82825130cfc6 100644 --- a/test/unit/lib/plugins/aws/info/getApiKeyValues.test.js +++ b/test/unit/lib/plugins/aws/info/getApiKeyValues.test.js @@ -68,6 +68,8 @@ describe('#getApiKeyValues()', () => { info: { apiKeys: [ { + customerId: undefined, + description: undefined, name: 'foo', value: 'valueForKeyFoo', },