Service
EC2
AWS API Action
DescribeKeyPairs
AWS Documentation
https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeKeyPairs.html
https://docs.aws.amazon.com/ec2/latest/devguide/errors-overview.html
If KeyName does not exist → InvalidKeyPair.NotFound (the specified key pair name does not exist).
Expected behavior
aws ec2 describe-key-pairs --key-names does-not-exist
→ error InvalidKeyPair.NotFound, non-zero CLI exit code.
Actual behavior
Floci returns HTTP 200 / CLI exit 0 with empty (or without the requested name):
Impact
Idempotent callers that treat describe-key-pairs --key-names X exit 0 as “present” skip ImportKeyPair / create and leave the account without the key.
Reproduction
export AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test AWS_DEFAULT_REGION=us-east-1
export AWS_ENDPOINT_URL=http://localhost:4566
# Fresh / empty account: no key pairs
aws ec2 describe-key-pairs --output json
# Missing name must fail like AWS (InvalidKeyPair.NotFound)
aws ec2 describe-key-pairs \
--key-names fintree-production \
--output json
echo "exit=$?"
Environment
- Floci version / image tag: nightly
- Running: Docker (port 4566)
Related
Service
EC2
AWS API Action
DescribeKeyPairs
AWS Documentation
https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeKeyPairs.html
https://docs.aws.amazon.com/ec2/latest/devguide/errors-overview.html
If
KeyNamedoes not exist →InvalidKeyPair.NotFound(the specified key pair name does not exist).Expected behavior
→ error
InvalidKeyPair.NotFound, non-zero CLI exit code.Actual behavior
Floci returns HTTP 200 / CLI exit 0 with empty (or without the requested name):
{ "KeyPairs": [] }Impact
Idempotent callers that treat
describe-key-pairs --key-names Xexit 0 as “present” skipImportKeyPair/ create and leave the account without the key.Reproduction
Environment
Related
DescribeKeyPairs.