AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

ValidateReqSigHandler

import "github.com/aws/aws-sdk-go/aws/corehandlers"

var ValidateReqSigHandler = request.NamedHandler{ Name: "core.ValidateReqSigHandler", Fn: func(r *request.Request) { if r.Config.Credentials == credentials.AnonymousCredentials { return } signedTime := r.Time if !r.LastSignedAt.IsZero() { signedTime = r.LastSignedAt } if signedTime.Add(5 * time.Minute).After(time.Now()) { return } fmt.Println("request expired, resigning") r.Sign() }, }

ValidateReqSigHandler is a request handler to ensure that the request's signature doesn't expire before it is sent. This can happen when a request is built and signed significantly before it is sent. Or significant delays occur when retrying requests that would cause the signature to expire.

ValidateReqSigHandler

On this page: