是否可以重命名AWS Lambda函数? [英] Is it possible to rename an AWS Lambda function?

查看:151
本文介绍了是否可以重命名AWS Lambda函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我出于测试目的在AWS上创建了一些Lambda函数(命名为test_function),然后在测试后我发现这些函数可以在prod env中使用.

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

是否可以重命名Lambda函数?如何? 还是应该创建一个新的并复制粘贴源代码?

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

推荐答案

最接近重命名lambda函数的方法是使用别名,这是命名lambda特定版本的一种方式.函数的实际名称是在创建后设置的.如果要重命名,只需创建一个新函数并将完全相同的代码复制到其中即可.这样做不会花费您任何额外的费用(因为您只需为执行时间付费),因此您什么也不会损失.

The closest you can get to renaming the lambda function is using an alias, which is a way to name a specific version of a lambda. 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.

有关如何命名lambda函数版本的参考,请参阅文档

For a reference on how to name versions of the lambda function check out the documentation here.

这篇关于是否可以重命名AWS Lambda函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆