SAP / node-rfc

Asynchronous, non-blocking SAP NW RFC SDK bindings for Node.js
Apache License 2.0
252 stars 73 forks source link

Call RFC(BAPI) from AWS Lambda using NodeJS #220

Closed public2public2 closed 2 years ago

public2public2 commented 3 years ago

Dear Srdjan,

I hope my note make you happy & safe!

I have one request, can you please explain how to call SAP BAPI using NodeJS and AWS lambda. I have gone through your material shared earlier in [https://github.com/sap/node-rfc]

But I don't know from where I should start?

What I have understood so far....

    • Create nodejs project
    • Install node-rfc module along with other dependency
    • RFC port of the backend must be exposed public to internet
    • Download the LINUX ON X86_64 64BIT version( Because Lambda run on Linux AMI)
    • SAP connectivity from your AWS Lambda- Both should be hosted on same premises
    • AWS Lambda layers- A Lambda Layer is a ZIP archive that contains libraries.
    • Docker container- not much understood
    • Create sapnwrfc.ini- for server connection details
    • Create a program to call RFM(Remote Function Module) with BAPI name

Please help me start and guide me step by step so I can deploy lambda to call BAPI using nodeJS

Thanks in Advance.

bsrdjan commented 3 years ago

I am not using Lambda and can't provide more detailed steps. It should work just like from on-premise Linux.

If on-premise system is S4HANA >= 1909 the new Websocket RFC protocol can be used, over HTTPS port exposed in internet. SAP Business Connector is required otherwise. More info: https://github.com/SAP/node-rfc/issues/212#issuecomment-829090667

The detailed configuration can be provided as a consulting service, if needed.

gimapei commented 2 years ago

I think, you can't using lambda. there are no netweaver sdk. lambda doesn't support netweaver sdk. that's why you can't using node-rfc on lambda service.

frumania commented 2 years ago

Thanks to @manishvyas1911 research, this is actually even easier to do.

We have created a simple walkthrough to setup your AWS Lambda Project for Node RFC.

bsrdjan commented 2 years ago

Thanks for the input. Potential users shall consider that node-rfc cloud to on-prem connections via SAP Cloud Connector are not supported yet: #121