Coder Social home page Coder Social logo

Comments (8)

hardyscc avatar hardyscc commented on May 20, 2024

@epiphaneSpecter You are trying to do lambda Synchronous invocation, therefore u need add another function handler for that

functions:
  custom-function:
    handler: src/custom-function.handler

however, it is more easy to just use the graphql client and invoke the same index-function through the API Gateway.

from aws-nestjs-starter.

epiphaneSpecter avatar epiphaneSpecter commented on May 20, 2024

@epiphaneSpecter You are trying to do lambda Synchronous invocation, therefore u need add another function handler for that

functions:
  custom-function:
    handler: src/custom-function.handler

however, it is more easy to just use the graphql client and invoke the same index-function through the API Gateway.

ok okay, but i would have to pay twice. i.e. both the lambda execution resources and the call through API Gateway.

from aws-nestjs-starter.

epiphaneSpecter avatar epiphaneSpecter commented on May 20, 2024

@hardyscc by declaring a new handler this time, the starting of nestjs will be done in a classic way as is nestjs done by default?

from aws-nestjs-starter.

hardyscc avatar hardyscc commented on May 20, 2024

@epiphaneSpecter Yes u need to bootstrap the nestjs server (i.e. src/index.ts) and invoke the function yourself.

from aws-nestjs-starter.

hardyscc avatar hardyscc commented on May 20, 2024

@epiphaneSpecter normally if just simple operation i won't bootup nestjs at all, and just instance a dynamodb model then do the update

from aws-nestjs-starter.

epiphaneSpecter avatar epiphaneSpecter commented on May 20, 2024

@epiphaneSpecter Yes u need to bootstrap the nestjs server (src/index.ts) and invoke the function yourself.

excuse me I'm a little lost, suppose I have two projects A and B. I'm currently in B and want to invoke A. I have to define a new hanlder in the A which will process my request (which does not come from API Gateway). So my question is: the logic that should be in my new handler should be how, just an idea.

from aws-nestjs-starter.

hardyscc avatar hardyscc commented on May 20, 2024

@epiphaneSpecter Yes u need to bootstrap the nestjs server (src/index.ts) and invoke the function yourself.

excuse me I'm a little lost, suppose I have two projects A and B. I'm currently in B and want to invoke A. I have to define a new hanlder in the A which will process my request (which does not come from API Gateway). So my question is: the logic that should be in my new handler should be how, just an idea.

the new handler is just a normal lamdba handler like that

export const handler = async (event, context) => { ... }

from aws-nestjs-starter.

epiphaneSpecter avatar epiphaneSpecter commented on May 20, 2024

@epiphaneSpecter Yes u need to bootstrap the nestjs server (src/index.ts) and invoke the function yourself.

excuse me I'm a little lost, suppose I have two projects A and B. I'm currently in B and want to invoke A. I have to define a new hanlder in the A which will process my request (which does not come from API Gateway). So my question is: the logic that should be in my new handler should be how, just an idea.

the new handler is just a normal lamdba handler like that

export const handler = async (event, context) => { ... }

ok, tks

from aws-nestjs-starter.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.