diff --git a/cmd/object-lambda-handlers.go b/cmd/object-lambda-handlers.go index fe97cc6ed..7270c4bd6 100644 --- a/cmd/object-lambda-handlers.go +++ b/cmd/object-lambda-handlers.go @@ -47,7 +47,7 @@ func getLambdaEventData(bucket, object string, cred auth.Credentials, r *http.Re } duration := time.Until(cred.Expiration) - if cred.Expiration.IsZero() || duration > time.Hour { + if duration > time.Hour || duration < time.Hour { // Always limit to 1 hour. duration = time.Hour }