https://pulumi.com logo
Title
c

cold-yacht-45876

07/02/2021, 12:42 AM
Hi, I'm using awsx.apigateway.API and would like to enable cloudwatch logging for a stage (not access logging). Is that possible somehow? I can't seem to find how to configure it. This is where it's configurable in the console:
l

little-cartoon-10569

07/02/2021, 12:59 AM
Is it the loggingLevel properties of StageRouteSettings and StageDefaultRouteSettings?
That applies only to WebSocket APIs?
c

cold-yacht-45876

07/02/2021, 9:37 AM
Not sure I understand. This is my current setup. Can you point to where I should attempt to set those?
const api = new awsx.apigateway.API(`${stackName}-web-api`, {        
        routes: [{
            path: "{proxy+}",
            method: "ANY",
            eventHandler: lambda,
            apiKeyRequired: true,            
        }],
        restApiArgs: {
            endpointConfiguration: {
                types: "REGIONAL"
            }
        },        
        stageName: environmentType
    });
l

little-cartoon-10569

07/04/2021, 8:54 PM
Everything in awsx is a wrapper around the equivalent aws resources, with opinionated defaults, simpler APIs, etc. It may be that the features you need are not exposed through awsx. Compare the awsx and aws implementations. See if the code you need is in aws and not awsx. If it's in aws only, you'll need to rewrite using the aws resources instead of the awsx ones. You can copy the code out of awsx for a quick start.