Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

AWS Lambda: invalid ELF header (python 3.6)

Started by Alexey Kulichevskiy -   in API Authentication

tl;dr: How to authenticate AWS Lambda using RSA key?
---

Hi, I'm writing an script that gets some data from Xero, transforms it and puts to a database.
I'm using private app.

Here is the code, related to Xero API. It works perfectly on my local machine (Mac)
This code is provided by the developer community - Xero does not warrant it in any way


Now I want to deploy it to AWS Lambda and schedule to run once a day.

Firstly I've built a package on my local machine, deployed it and got this error:
This code is provided by the developer community - Xero does not warrant it in any way


I've googled it and discovered that there is a bug in cryptography on Mac. The solution is to build a package on Linux. I've done this, tried again and this time got a new error:
This code is provided by the developer community - Xero does not warrant it in any way


This one is utterly confusing. I've failed to find anything useful in the Internet.

Could you please advice on how to deploy the app to AWS Lambda?