AWS Lambda- Go runtime vs Custom runtime difference

huangapple go评论61阅读模式
英文:

AWS Lambda- Go runtime vs Custom runtime difference

问题

根据官方文档和许多教程,使用Golang的AWS Lambda函数需要提供一个包含可执行二进制文件的压缩文件。我不禁想知道:将代码/应用程序转换为可执行二进制文件后,它还算是Golang吗?那么为什么要指定Go运行时选项,而不是使用传统的自定义运行时呢?

英文:

As I have seen in official documentation and many tutorials, AWS Lambda functions using Golang are provided with a zip file containing executable binary.
I cannot help but wonder: after converting the code/ app to executable binary, is it even Golang anymore ? So why designate a Go runtime option, rather than using good old custom runtime ?

答案1

得分: 1

> Go运行时与自定义运行时之间的区别

Go运行时和自定义运行时之间没有区别,因为在底层,Go被视为自定义运行时并相应地运行。

> 那么为什么要指定Go运行时选项,而不是使用传统的自定义运行时?

因为对于Go,他们已经创建了一个名为provided.al2的运行时,这样Go开发人员就可以选择提供的provided.al2运行时,并提供所需的引导文件来利用它。

还有一件重要的事情:

使用Amazon Linux操作系统的运行时(如Go 1.x)不支持arm64架构。要使用arm64架构,您可以使用提供的provided.al2运行时来运行Go。

英文:

> Difference between Go runtime vs Custom runtime

There is no difference between Go runtime and Custom runtime because under the hood, Go is treated as a custom runtime and runs accordingly

> So why designate a Go runtime option, rather than using good old
> custom runtime?

Because For Go they have already created a runtime provided.al2 so that A Go developer can take advantage of this by choosing the provided.al2 runtime and providing the required bootstrap file.

and one important thing

Runtimes that use the Amazon Linux operating system, such as Go 1.x, do not support the arm64 architecture. To use arm64 architecture, you can run Go with the provided.al2 runtime.

huangapple
  • 本文由 发表于 2022年1月26日 14:06:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/70859199.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定