Search code examples
amazon-web-servicesrenameaws-lambda

Is it possible to rename an AWS Lambda function?


I have created some AWS Lambda functions for testing purposes (named as test_function something), then after testing I found those functions can be used in prod environment.

Is it possible to rename the AWS Lambda function? and how? Or should I create a new one and copy paste source code?


Solution

  • The closest you can get to renaming the AWS Lambda function is using an alias, which is a way to name a specific version of an AWS Lambda function. The actual name of the function though, is set once you create it. If you want to rename it, just create a new function and copy the exact same code into it. It won't cost you any extra to do this (since you are only charged for execution time) so you lose nothing.

    For a reference on how to name versions of the AWS Lambda function, check out the documentation here: Lambda function versions .