acoustic-arm-10406
08/23/2021, 6:54 PMpulumi up
?
const lambdaAlias = new aws.lambda.Alias("DEV", {
functionName: routeKey + "DEV",
// functionVersion: "1", // how do I get this to pull from the current alias instead of overriding with "1" each time I pulumi up?
});
(side note, our devops is going to change the function version outside of this project when we canary deploy, so we don't want it overriding)little-cartoon-10569
08/23/2021, 9:40 PMwhite-balloon-205
08/24/2021, 9:36 PMhow do I get this to pull from the current alias instead of overriding with "1" each time I pulumi up?If I understand your scenarios correctly - I believe you can use https://www.pulumi.com/docs/reference/pkg/aws/lambda/getfunction/#version_nodejs.
const lambdaAlias = new aws.lambda.Alias("DEV", {
functionName: routeKey + "DEV",
functionVersion: aws.lambda.getFunction({functionName: routeKey + "DEV"}).version,
});
little-cartoon-10569
08/24/2021, 10:43 PM