Skip to content

Commit

Permalink
Avoid using reference to resource as ID
Browse files Browse the repository at this point in the history
  • Loading branch information
Tehnix committed Nov 2, 2023
1 parent 291c0b3 commit 42281fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion deployment/lib/services/lambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ export class Stack extends cdk.Stack {
this.exportValue(fnUrl.url);

// Set up alias so each deployment is versioned and can live next to each other.
const aliasFn = lambdaFn.addAlias(`fn-${lambdaFn.currentVersion.version}`, {});
const aliasFn = new lambda.Alias(this, `LambdaAlias${id}`, {
aliasName: `fn-${lambdaFn.currentVersion.version}`,
version: lambdaFn.currentVersion,
});

const aliasFnUrl = aliasFn.addFunctionUrl({
authType: lambda.FunctionUrlAuthType.NONE,
Expand Down

0 comments on commit 42281fe

Please sign in to comment.