• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

aws lambda : Invalid cross-device link

New Here ,
Dec 14, 2021 Dec 14, 2021

Copy link to clipboard

Copied

I have tried creating layer and the main code file in ec2 linux instance. Because i thought it might be due to OS dependencies, as lambda uses linux and i was using windows.

Now the code is runing but file is not being saved it shows error like,

 

Response
{
"errorMessage": "[Errno 18] Invalid cross-device link: '/tmp/extractSdkResult/b0ad3e245d6211eca02c3e63cbdf52ea.zip' -> '/var/task/ExtractTextInfoFromPDF.zip'",
"errorType": "OSError",
"stackTrace": [
" File \"/var/task/lambda_function.py\", line 40, in lambda_handler\n result.save_as(\"./ExtractTextInfoFromPDF.zip\")\n",
" File \"/opt/python/adobe/pdfservices/operation/internal/io/file_ref_impl.py\", line 45, in save_as\n os.rename(self._file_path, abs_path)\n"
]
}

 

It is not saving file.

I have tried shutil.copy() mtd instead of os.rename() in adobe library but still file is not getting saved

 

If you think i can use another mode  instead of using this line

# Execute the operation.
result: FileRef = extract_pdf_operation.execute(execution_context)

# Save the result to the specified location.(THIS ONE)
result.save_as("./ExtractTextInfoFromPDF.zip")

TOPICS
PDF Extract API , PDF Services API

Views

362

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources