aws-apigateway: Custom log format account ID gets translated incorrectly #21731
Labels
@aws-cdk/aws-apigateway
Related to Amazon API Gateway
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
good first issue
Related to contributions. See CONTRIBUTING.md
p1
package/tools
Related to AWS CDK Tools or CLI
Describe the bug
I want to set up custom log format for API Gateway:
Expected Behavior
According to the definition of
AccessLogField.contextAccountId()
this should returnThe API owner's AWS account ID.
After synthesizing the template, this should then get translated to$context.accountId
.Current Behavior
AccessLogField.contextAccountId()
gets translated to$context.identity.accountId
which would return the account ID of the caller.Reproduction Steps
Setup a
RestApi
with custom log format and useAccessLogField.contextAccountId()
.Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.38.1 (build a5ced21)
Framework Version
No response
Node.js Version
v16.17.0
OS
macOS
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: