Free Support Forum - aspose.cloud

Convert PowerPoint Presentation Slide to PDF in AMAZON Lambda using Aspose.Slides REST API

Hi, Everybody

I have some doubt about implementation aspose slides within amazon Lambda, I want to download file inside Amazon Lambda from Bucket, then I need convert this document to PDF Format using ASPOSE SLIDE Library but when I’ve executed the code, show the next message when invoke asposeslidescloud.SlidesApi(configuration) function:

“errorMessage”: “[Errno 38] Function not implemented”,
" File “/var/lang/lib/python3.8/multiprocessing/synchronize.py”, line 57, in init\n sl = self._semlock = _multiprocessing.SemLock(

I don’t know how integrate this strategy between AWS Lambda and Aspose Slides using Python.
This code is given the below section:

def configurationDocument():
configuration = asposeslidescloud.Configuration()
configuration.app_sid = os.environ[‘APP_SID’]
configuration.app_key = os.environ[‘APP_KEY’]
return asposeslidescloud.SlidesApi(configuration)

Regards.
Thanks for all.

@rogerguzman87

We are sorry for the inconvenience. We have logged a ticket SLIDESCLOUD-1092 for further investigation. We will keep you updated about the issue resolution progress within this forum thread.

Hi @tilal.ahmad

Thansk for your answer, additionally I’ve implemented a lambda function on AWS using asposewordcloud, the code is given below

import os
import asposewordscloud
from asposewordscloud import WordsApi
import asposewordscloud.models.requests
from asposewordscloud.rest import ApiException

client_id = '######################'
secret = '######################'
**words_api = WordsApi(client_id, secret)**
fileName = ".....docx"
format = "pdf"
words_api.upload_file(asposewordscloud.models.requests.UploadFileRequest(open(fileName, 'rb'), "", None))
request = asposewordscloud.models.requests.ConvertDocumentRequest(open(fileName, 'rb'), format, None, None, None, None)
result = words_api.convert_document(request)
print("Result {}".format(result))

When execute WordsApi function, show same error. I’ve read and understand that Amazon Lambda doesn’t allow multithread programming, but I need uses that library for use it.

Thanks for all!!`

@rogerguzman87

We have logged a ticket WORDSCLOUD-1478 for investing the issue and will notify you as soon as it is resolved.

Hi

I’ve not found solution for this error.

Thansk for All

@rogerguzman87

I am afraid, we have not completed the investigation yet. We will share the details as soon as we complete the investigation.

@rogerguzman87

About SLIDESCLOUD-1092, we have completed the issue investigation and it will be fixed in Aspose.Slides Cloud SDK for Python 21.2.

As a temporary solution, you can patch asposeslidescloud/api_client.py file to exclude the initialization and finalization of ThreadPool object.

Remove or comment out line 70:

        #self.pool = ThreadPool()

Remove or comment out the code inside del function (lines 77 - 79):

    def __del__(self):
        pass
        #self.pool.close()
        #self.pool.join()
1 Like