Skip to content

Commit

Permalink
preserve env vars when optimising
Browse files Browse the repository at this point in the history
  • Loading branch information
mriccia committed May 24, 2023
1 parent f6d7ad1 commit 32f9533
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lambda/optimizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ module.exports.handler = async(event, context) => {
await utils.setLambdaPower(lambdaARN, optimalValue);
} else {
// create/update alias
await utils.createPowerConfiguration(lambdaARN, optimalValue, autoOptimizeAlias);
const {envVars} = await utils.getLambdaPower(lambdaARN);
await utils.createPowerConfiguration(lambdaARN, optimalValue, autoOptimizeAlias, envVars);
}

return 'OK';
Expand Down

0 comments on commit 32f9533

Please sign in to comment.