pulumi / pulumi-aws-apigateway

Apache License 2.0
11 stars 5 forks source link

Allow specifying LambdaAuthorizer Node runtime #26

Open austinbutler opened 2 years ago

austinbutler commented 2 years ago

Hello!

Issue details

Seems to choose Node 12.x and not allow configuring, is that intentional?

stack72 commented 2 years ago

Hi @austinbutler

What version of pulumi-awsx are you using?

Paul

austinbutler commented 2 years ago

0.30.0

stack72 commented 2 years ago

Hi @austinbutler

Please can you give me a snippet of the code you are using here to help me understand what you want us to change?

Thanks

Paul

austinbutler commented 2 years ago

Something like:

const authorizer: awsx.apigateway.LambdaAuthorizer = {
  ...restOfParams,
  runtime: "nodejs14.x",
  handler: async (
    event: awsx.apigateway.AuthorizerEvent
  ): Promise<awsx.apigateway.AuthorizerResponse> => {
    return awsx.apigateway.authorizerResponse(
      principal,
      effect,
      event.methodArn,
      undefined,
      apikey
    );
  },
};

Runtime doesn't seem to be exposed here: https://github.com/pulumi/pulumi-awsx/blob/af311d33f20aef8462ada78b494ea17ec16e767c/nodejs/awsx/apigateway/lambdaAuthorizer.ts#L32