[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
Qualifierquery parameter.Invokehonours?Qualifier=<version|alias>, the wayaws lambda invoke --qualifierand every SDK send it (Invoke API reference):- The call runs that version or alias, and
X-Amz-Executed-Versionnames 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.
- The call runs that version or alias, and
- 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
OnFailuredestination or dead-letter queue therefore receives the event about three minutes after the invoke.
Actual behavior
Invokedrops theQualifierquery parameter.aws lambda invoke --qualifier liveruns$LATESTand reportsExecutedVersion: $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.- All retry attempts run back to back, milliseconds apart. The
OnFailurerecord arrives almost at once, so a test that relies on the retry window, or onMaximumEventAgeInSecondscutting retries short, cannot be reproduced locally.
Reproduction
# 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 minutesEnvironment
- Floci version / image tag:
mainat e6ee34676 - Java SDK version (if applicable): AWS SDK for Java v2
- How you're running Floci (Docker / native /
mvn quarkus:dev):mvn quarkus:devand the Docker image
Source: floci-io/floci