Closed garyyang6 closed 10 months ago
Hi @garyyang6, I apologize for the confusion and the error you encountered regarding enabling logging for your API Gateway. Enabling logging through pulumi_aws_apigateway
is not supported, which is why you received the has no attribute 'StageLog' error. The only resource currently supported in this package is RestAPI
(documentation).
To assist you further, it would be helpful if you could provide additional details on how you encountered this nonexistent method. Understanding the specific steps or code that led to this error will allow us to investigate and address the issue more effectively.
Regarding a working example, you can adapt the following code snippet to enable logging for your API Gateway:
api_gateway_account = aws.apigateway.Account("example_account",
cloudwatch_role_arn= log_group.arn
)
This snippet utilizes the Account
resource from the pulumi-aws
(https://www.pulumi.com/registry/packages/aws/api-docs/apigateway/account/) to enable logging on the API Gateway Account. By associating the CloudWatch log group ARN (log_group.arn) with the API Gateway Account, you can enable logging for your API Gateway.
Please give this approach a try and let us know if it unblocks you. If you have any further questions or encounter any issues, please don't hesitate to reach out. We're here to help!
Closing due to inactivity
Hello!
Issue details
I use Pulumi with the Python module pulumi_aws_apigateway to create Lambda function and API Gateway. I would like to enable CloudWatch Logs with "Full Request and Response Logs" for Logs/Tracing. I got errors as follows:
As the error states, the module 'pulumi_aws_apigateway' has no attribute 'StageLog'. Is there any another way to connect the API Gateway state to the CloudWatch Log Group? As follows is my code.
Affected area/feature