cognitect-labs / aws-api

AWS, data driven
Apache License 2.0
727 stars 100 forks source link

InvalidSignatureException when invoking :PostToConnection #255

Open wkok opened 5 months ago

wkok commented 5 months ago

Dependencies

{com.cognitect.aws/api                     {:mvn/version "0.8.692"}
 com.cognitect.aws/endpoints               {:mvn/version "1.1.12.701"}
 com.cognitect.aws/apigatewaymanagementapi {:mvn/version "847.2.1365.0"}}

Description

Invoking :PostToConnection works fine for the first few invocations

(-> (aws/client {:api               :apigatewaymanagementapi
                 :endpoint-override {:hostname "xxxxxxx.execute-api.eu-central-1.amazonaws.com"
                                     :path     "/xxxx/@connections/"}})

    (aws/invoke  {:op      :PostToConnection
                  :request {:ConnectionId "xxxxxxx"
                            :Data         "some data"}}))

but, after leaving it idle for about 5-10 mins then invoking it again, hangs on aws/invoke for about 5 minutes after which the following is returned as the result:

{:message "Signature expired: 20240425T100521Z is now earlier than 20240425T101638Z (20240425T102138Z - 5 min.)",
 :cognitect.aws.http/status 403,
 :cognitect.anomalies/category :cognitect.anomalies/forbidden,
 :cognitect.aws.error/code "InvalidSignatureException"}

Stack traces

None