localstack / localstack

💻 A fully functional local AWS cloud stack. Develop and test your cloud & Serverless apps offline
https://localstack.cloud
Other
56.47k stars 4.03k forks source link

bug: Wrong exception messages when Lambda alias does not exist / unclear behavior for function url deletion #11832

Open dfangl opened 6 days ago

dfangl commented 6 days ago

Is there an existing issue for this?

Current Behavior

For some Lambda operations, like lambda.UpdateAlias and lambda.DeleteAlias, the error message when an alias does not exist does not match the error message AWS raises.

Also, when deleting a function url config, we currently do not know if only specifying the function name (without a qualifier) will also delete the function url configs of all aliases.

Expected Behavior

Correct error messages returned for Lambda alias handling

Proper behavior when deleting a function url config without specifying a qualifier if there are function url configs for aliases.

How are you starting LocalStack?

With a docker-compose file

Steps To Reproduce

How are you starting localstack (e.g., bin/localstack command, arguments, or docker-compose.yml)

DEBUG=1 docker compose up

Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

awslocal lambda update-alias --name teonoow --function-name test-function
awslocal lambda delete-alias --name teonoow --function-name test-function

I don't have a command for the delete function url config issue yet

Environment

- OS: Arch Linux
- LocalStack:
  LocalStack version: 3.8.2.dev98
  LocalStack Docker image sha: sha256:54259eb9b9314f5f2280cada9be28c379142acadef21632ab1c0b0af22f41ba9
  LocalStack build date: 2024-11-12
  LocalStack build git hash: ab64e0f9d

Anything else?

No response

anisaoshafi commented 6 days ago

Hey @dfangl, feel free to assign this issue to me :)