Skip to content

Commit af7f760

Browse files
authored
chore(parser): add workaround to make API GW test button work (#1971)
1 parent 8296945 commit af7f760

File tree

1 file changed

+3
-1
lines changed
  • aws_lambda_powertools/utilities/parser/models

1 file changed

+3
-1
lines changed

Diff for: aws_lambda_powertools/utilities/parser/models/apigw.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ class APIGatewayEventIdentity(BaseModel):
3131
cognitoIdentityId: Optional[str]
3232
cognitoIdentityPoolId: Optional[str]
3333
principalOrgId: Optional[str]
34-
sourceIp: IPvAnyNetwork
34+
# see #1562, temp workaround until API Gateway fixes it the Test button payload
35+
# removing it will not be considered a regression in the future
36+
sourceIp: Union[IPvAnyNetwork, Literal["test-invoke-source-ip"]]
3537
user: Optional[str]
3638
userAgent: Optional[str]
3739
userArn: Optional[str]

0 commit comments

Comments
 (0)