Skip to content

Commit 93802fd

Browse files
committed
PR feedback
1 parent 5a2e515 commit 93802fd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lambda/initializer.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,31 @@ module.exports.handler = async(event, context) => {
2020
// fetch initial $LATEST value so we can reset it later
2121
const {power} = await utils.getLambdaPower(lambdaARN);
2222

23-
let lambdaFunctionsToSet = [];
23+
let initConfigurations = [];
2424

2525
// reminder: configuration updates must run sequentially
2626
// (otherwise you get a ResourceConflictException)
2727
for (let powerValue of powerValues){
2828
const baseAlias = 'RAM' + powerValue;
2929
if (!onlyColdStarts){
30-
lambdaFunctionsToSet.push({powerValue: powerValue, alias: baseAlias});
30+
initConfigurations.push({powerValue: powerValue, alias: baseAlias});
3131
} else {
3232
for (let n of utils.range(num)){
3333
let alias = utils.buildAliasString(baseAlias, onlyColdStarts, n);
3434
// here we inject a custom env variable to force the creation of a new version
3535
// even if the power is the same, which will force a cold start
36-
lambdaFunctionsToSet.push({powerValue: powerValue, alias: alias});
36+
initConfigurations.push({powerValue: powerValue, alias: alias});
3737
}
3838
}
3939
}
4040
// Publish another version to revert the Lambda Function to its original configuration
41-
lambdaFunctionsToSet.push({powerValue: power});
41+
initConfigurations.push({powerValue: power});
4242

4343
const returnObj = {
44-
initConfigurations: lambdaFunctionsToSet,
44+
initConfigurations: initConfigurations,
4545
iterator: {
4646
index: 0,
47-
count: lambdaFunctionsToSet.length,
47+
count: initConfigurations.length,
4848
continue: true,
4949
},
5050
powerValues: powerValues,

0 commit comments

Comments
 (0)