-
Notifications
You must be signed in to change notification settings - Fork 61
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
Using python for lambda functions #1823
Comments
Hey @cookiejest, thank you for reaching. As the RFC: #1543 provides this is currently not supported. But wanted to provide some information on this. To create a python function you can utilize the CDK Lambda construct: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda-readme.html Additionally, you can create the function on the console or a tool and reference the function for your use cases using the fromFunctionArn method. |
Ok, as I am not able to use experimental approach, I decided to deploy python lambda functions separately in another repo and keep amplify updated via graphQL. However I havn't figured out a clean way to add custom graphql yet within the amplify v2. I listed this seperately under aws-amplify/amplify-category-api#2754 |
You can try this simple approach to create a custom python lambda resource https://medium.com/@misha.slyusarev/amplify-gen-2-custom-python-function-with-cdk-5e5b79b91b10 |
cool! What user will the custom function run under? If want to add the equivilent of only authenticated, is it possible? |
#1602 You can check my pr, it's allowing to use custom runtimes in data resources.ts, you can use go, python functions in graphql query and mutations |
i saw it. I can see it's blocked at the moment as the AWS team would need to do additional house keeping to support it properly, I cannot risk using the separate branch for my project unfortunately!
Thanks, this looks more stable but has to introduce docker complexity. Maybe it would be better if had an example deploying amplify app and associated resources via SAM so amplify can be adopted by people already with a deployment pipeline and just using amplify for the front end auth with cognito? Thanks! |
You don't need to use docker, you can bypass this |
Environment information
Description
hi would like to use python for some of the lambda functions. It looks like this is not supported yet but can see this.
#1543
Assuming this issue will not be supported soon - What would be the next best approach to do this? Is it to create an API gateway and cognito auth and run the queries that way or is there a better approach?
The text was updated successfully, but these errors were encountered: