Closed johannesjasper closed 3 years ago
It seems to me that within the lambda running the WSGI app it tries to invoke itself (the same lambda) but cannot validate the SSL certificates of the AWS API.
Can somebody verify this very basic understanding?
I updated the original post with a minimal example.
While working on a workaround I discovered that ALL commuinication to AWS APIs is problematic. I tried to 'manually' (using boto3) send a message to SQS, with the same SSL issue
SSL validation failed for https://eu-central-1.queue.amazonaws.com/ [Errno 2] No such file or directory
The problem seems to lie somewhere in the base image used for Python Lambdas... :thinking:
I used zappa shell dev
in order to see if I can use boto3 inside my lambda
(Pdb) import boto3
(Pdb) s3 = boto3.resource('s3')
(Pdb) [bucket for bucket in s3.buckets.all()]
# --> [... lists all my buckets]
If my assumption that the execution environment was lacking some certificates was right, this should not have worked, right?
Closing as duplicate of https://github.com/Miserlou/Zappa/issues/2127. The suggested workaround mitigated my issue https://stackoverflow.com/a/63642707/1821901.
When using async tasks with Zappa, I get
botocore.exceptions.SSLError: SSL validation failed for <AWS domain>[Errno 2] No such file or directory
Context
I am deploying a Falcon (WSGI) app with an endpoint that triggers a long-running task. In order to avoid request timeouts, I am using the
@task
decorator around the long-running function.Example
See this minimal example.
Expected Behavior
Using the
@task
decorator should workActual Behavior
As soon as I use the
@task
decorator, my requests fail with the following stack traceWhen I use
@task_sns
I get the same result, except withIt seems to me that within the lambda running the WSGI app it tries to invoke itself (the same lambda) but cannot validate the SSL certificates of the AWS API.
Your Environment
pip freeze
:zappa_settings.json
:Things I read and tried
@task
decorator everything is working as expected."vpc_config"
.