Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for custom runtimes inside functions since GO will be deprecated in lambda #13109

Open
1 of 2 tasks
Bryson14 opened this issue Aug 14, 2023 · 9 comments
Open
1 of 2 tasks
Labels
feature-request Request a new feature functions Issues tied to the functions category p3

Comments

@Bryson14
Copy link

Is this feature request related to a new or existing Amplify category?

No response

Is this related to another service?

Lambda

Describe the feature you'd like to request

I would like a method to have custom runtime languages inside the functions. This is in response to LAMBDA announcing that as of the end of Dec 2023, the Go 1.x runtime will no longer be supported in favor of using the provided.al2 base image. This is more in line with other compiled languages like rust and C++

https://aws.amazon.com/blogs/compute/migrating-aws-lambda-functions-from-the-go1-x-runtime-to-the-custom-runtime-on-amazon-linux-2/

Describe the solution you'd like

when creating a function, you would specify the type of the runtime, and the option would be "custom",

then there would be an additional file, similar to the amplify.yml file that will allow the user to add the required script commands in order to compile and package the code so that the amplify framework can take it and upload it.

Describe alternatives you've considered

One alternative would be to take my existing GO functions off of amplify before the end of the year. This would be a pain since the amplify framework is wonderful for deploying the lambda code

Additional context

No response

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this feature request

Would this feature include a breaking change?

  • ⚠️ This feature might incur a breaking change
@Bryson14 Bryson14 added the pending-triage Issue is pending triage label Aug 14, 2023
@josefaidt josefaidt added functions Issues tied to the functions category feature-request Request a new feature p3 and removed pending-triage Issue is pending triage labels Aug 14, 2023
@redjonzaci
Copy link
Contributor

Any update on this?

@nam-truong-le
Copy link

Hi, do you have any update on this? We would like to migrate our go functions too. Thank you.

@naoki-niwa
Copy link

hope update 😢

@redjonzaci
Copy link
Contributor

  1. How is this not a p1? Our pipeline is now failing because Go 1.x is no longer supported.
  2. Has anyone come up with a fix for this?

@redjonzaci
Copy link
Contributor

I found out that you can add a custom runtime as a plugin. You can follow the Authoring a new plugin guide and then you can adapt the generated code to match the code in amplify-go-function-runtime-provider and amplify-go-function-template-provider.

  1. Create 2 plugins where one that will be used in place of amplify-go-function-runtime-provider and the other in place of amplify-go-function-template-provider.
  2. Update the value of the following constant from "main" to "bootstrap".
  3. Update the Runtime property of your Go Lambda functions in their CFN templates from "go1.x" to "provided.al2023".

We are working on sharing the exact code we used, but the above instructions should help solve the issue.

@Bryson14
Copy link
Author

Bryson14 commented Mar 8, 2024

Personally, I do some development in Rust because the DX, packaging, and stability are great. it would be nice to write some of the lambda functions in Rust for specific tasks.

@redjonzaci
Copy link
Contributor

@Bryson14 I think you can support Rust too with the method I described, but if you're looking for official support, hope it is added soon!

@redjonzaci
Copy link
Contributor

Also, to get the approach I described above working in Amplify Hosting, the commands in Plugin Installation should be added in amplify.yml.

@MarlonJD
Copy link

I created #13659 for this, we need this ASAP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request a new feature functions Issues tied to the functions category p3
Projects
None yet
Development

No branches or pull requests

6 participants