Hi, I've been using this to connect API Gateway to...
# aws
c
Hi, I've been using this to connect API Gateway to a lambda:
Copy code
const api = new awsx.apigateway.API(`${stackName}-web-api`, {        
        routes: [{
            path: "{proxy+}",
            method: "ANY",
            eventHandler: lambda,
            apiKeyRequired: true,
        }],
        restApiArgs: {
            endpointConfiguration: {
                types: "REGIONAL"
            },
        },        
        stageName: environmentType
    });
, but now I want to have API Gateway to target a lambda alias instead of the actual lambda. I can't seem to figure out how. Any ideas?
g
Where are you defining the variable
lambda
in your code?