Select to view content in your preferred language

Arcgis API on AWS Lambda

9694
14
Jump to solution
10-13-2017 10:58 AM
DanielHunter
Regular Contributor

I'm trying to upload a package to AWS Lambda and can not find/install the ArcGIS Python API for my package.  Has anyone done this?

Thanks.

14 Replies
DavidAskov1
Regular Contributor

Jon - I think you are looking for info on ArcPy. This thread is about Esri's other major Python API, called the "ArcGIS API for Python" (not a very creative name). ArcPy requires licensing, whereas the ArcGIS API for Python does not. That is more about working with server products, so you usually have to authenticate to the server, but you don't need any license to use the API itself. 

AndresCastillo
MVP Regular Contributor

@JonNordling1 ,

I believe if you use the checkOutextension function in the uploaded lambda script, it becomes a matter of access.

If the aws environment where the lambda is deployed has port access to the license manager, it should be able to grab the license for the script.

I have not verified this, but this are my thoughts on this.

0 Kudos
AndresCastillo
MVP Regular Contributor

Seems like ArcPy is too big to fit into lambda restrictions:
https://community.esri.com/t5/python-ideas/allow-arcpy-to-be-loaded-and-executed-through-aws/idi-p/1...

There should be other alternatives to explore, such as AWS Fargate, or AWS Batch

0 Kudos
joonpark
Occasional Contributor

Hi guys,

- Packaged ONLY in Linux env ? I was playing with Anaconda / Conda in window 10 ( all that virtual env. mimicking)  and install ArcGIS package but no luck.

below is error from AWS Lambda with simple "from arcgis.gis import GIS" testing

- {
"errorMessage": "Unable to import module 'main': No module named 'requests'",
"errorType": "Runtime.ImportModuleError"
}

Thanks

0 Kudos
MichaelKarikari1
Occasional Contributor

I was curious if anyone has recent success with this using the latest arcgis api module. The size of the site-package folder that gets filed up with ArcGIS API python dependencies seems to always be larger that was is allowed. Ive tried striping the package that would be uploaded to just the API module, but seems that lambda always complains of need additional modules in order to run