chalice icon indicating copy to clipboard operation
chalice copied to clipboard

possible to write pure function in javascript inside chalice?

Open dragonballa opened this issue 3 years ago • 1 comments

i want to create a pure function but the actual code is already in javascript that I want to deploy via chalice

is this possible? how can i pull something like this off, maybe store my javascript somewhere and have chalice upload?

also is it possible to apply @app.routes to this pure lambda function?


@app.lambda_function()
def custom_lambda_function(event, context):
    console.log(''); 
    var hello = "hello world";
    return hello

dragonballa avatar Jul 04 '22 18:07 dragonballa

This won't work as you documented here.

You can do is use the Cloudformation support in chalice deploy to add an extra endpoint to the API Gateway. Have that reference reference your node Lambda that you package using Cloudformation. Checkout the documentation at https://aws.github.io/chalice/topics/cfn.html for more info on the Cloudformation support in chalice.

skwashd avatar Jul 13 '22 10:07 skwashd