-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid format in AccessLogSettings produced for websocket Api GW stage #7038
Comments
Update: I checked the deployment we made about one week back and it also has the same $context.status format, but was accepted by AWS API Gateway. This makes me think that AWS changed something during the past few days, no longer accepting the $context.status property for websocket logs. If so, I assume SLS simply needs to adapt to this fact? |
I went to find where this was located in the code and found that it was already fixed in d1537f7#diff-0b32a7aba4382097ae2219b301f674d2 When will this make it into a release? |
Sorry about delay. It'll be released first thing tomorrow CET morning. |
Closing as duplicate of #7016 |
I am still having this issue in 1.59 Logs:
|
Are you sure you're using CF template as generated by 1.59.0, and not e.g. one generated with older version ? In v1.59.0, there's no mention of |
Bug Report
Description
I have a websocket API gateway which has been deployed multiple times successfully. Now, all of a sudden the stack fails due to the
Format
of theAccessLogSettings
in myAWS::ApiGatewayV2::Stage
resource calledWebsocketsDeploymentStage
including$context.status
which is not a valid context variable for websocket API:s, only REST API:s.I don't know if this is due to a recent change in SLS or in AWS, but this API was deployed many times before without issues.
The following context variables are not supported: [$context.status] (Service: AmazonApiGatewayV2; Status Code: 400; Error Code: BadRequestException; Request ID: aa19bd81-9ef4-4182-89cd-29ae21d46fa1)
My serverless.yml file simply contains one or more functions with websocket events:
This automatically causes SLS to create CF resources
WebsocketsDeploymentStage
etc:I managed to temporarily resolve this by overriding the
WebsocketsDeploymentStage
resource to override theAccessLogSettings.Format
property and remove$context.status
from the value:Then the stack was deployed just fine. But it seems like SLS is applying a default format string for the deployment stage which is not accepted by CF due to the use of the unsupported variable
$context.status
.Similar or dependent issues:
The text was updated successfully, but these errors were encountered: