1
votes

I have an ETL script that I run on the AWS Lambda. What's strange is the the actual published code gives me a different result than the testing.

For instance, when I run the code with an input event, it runs well in the testing mode. However, when the same exact code is run in the published state, it gives me an error. (Always the same error as below)

[ERROR] JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "/var/task/etl_script.py", line 50, in lambda_handler
    model_properties = forge_util.get_model_data(model_urn_encoded)
  File "/var/task/forge_util.py", line 91, in get_model_data
    model_metadata = request_metadata.json()
  File "/var/task/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)

Is this a problem in the code itself? Or is it a problem in the configuration of the Lambda script? If it's a code problem, why does it never happen in the test execution?

Thank you in advance!

"Is this a problem in the code itself?" most likely, but without seeing your code how can we possibly say for sure? - Mark B