#4732·floci

[BUG] Lambda Invoke ignores the Qualifier parameter, and asynchronous retries run back to back

Author: mariotoffiaCreated Sep 30, 2026Updated Sep 30, 2026
Labelsbuglambda

Service

Lambda

AWS API Action

Invoke (POST /2015-03-31/functions/{FunctionName}/invocations), with InvocationType Event, RequestResponse and DryRun.

Expected behavior

  1. Qualifier query parameter. Invoke honours ?Qualifier=<version|alias>, the way aws lambda invoke --qualifier and every SDK send it (Invoke API reference):
    • The call runs that version or alias, and X-Amz-Executed-Version names the version that ran.
    • An asynchronous invoke on an alias uses the alias's event invoke configuration and destinations.
    • An unknown qualifier returns 404 ResourceNotFoundException.
    • A qualifier that disagrees with one embedded in the function name returns 400 InvalidParameterValueException.
  2. Retry timing. A failed asynchronous invocation is retried after a wait. AWS "attempts to run it two more times, with a one-minute wait between the first two attempts, and two minutes between the second and third attempts" (Error handling and automatic retries). An OnFailure destination or dead-letter queue therefore receives the event about three minutes after the invoke.

Actual behavior

  1. Invoke drops the Qualifier query parameter. aws lambda invoke --qualifier live runs $LATEST and reports ExecutedVersion: $LATEST. The alias's event invoke configuration and destinations are never applied, and an unknown qualifier is not rejected. Only a qualifier embedded in the function name (my-fn:live, or a qualified ARN) is honoured.
  2. All retry attempts run back to back, milliseconds apart. The OnFailure record arrives almost at once, so a test that relies on the retry window, or on MaximumEventAgeInSeconds cutting retries short, cannot be reproduced locally.

Reproduction

bash
# 1. Qualifier is ignored
aws --endpoint-url http://localhost:4566 lambda publish-version --function-name my-fn
aws --endpoint-url http://localhost:4566 lambda create-alias --function-name my-fn --name live --function-version 1
aws --endpoint-url http://localhost:4566 lambda invoke --function-name my-fn --qualifier live out.json
# ExecutedVersion is $LATEST, expected 1
aws --endpoint-url http://localhost:4566 lambda invoke --function-name my-fn --qualifier nope out.json
# succeeds, expected ResourceNotFoundException

# 2. Retries do not wait (failing-fn always throws)
aws --endpoint-url http://localhost:4566 lambda put-function-event-invoke-config --function-name failing-fn \
  --maximum-retry-attempts 2 \
  --destination-config '{"OnFailure":{"Destination":"arn:aws:sqs:us-east-1:000000000000:failures"}}'
aws --endpoint-url http://localhost:4566 lambda invoke --function-name failing-fn --invocation-type Event out.json
# the OnFailure record is in the queue within a second, expected after about three minutes

Environment

  • Floci version / image tag: main at e6ee34676
  • Java SDK version (if applicable): AWS SDK for Java v2
  • How you're running Floci (Docker / native / mvn quarkus:dev): mvn quarkus:dev and the Docker image