Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to deploy Zappa to AWS Lambda return 502 everytime #2242

Open
cartoonmangodev1 opened this issue Apr 15, 2023 · 1 comment
Open

Unable to deploy Zappa to AWS Lambda return 502 everytime #2242

cartoonmangodev1 opened this issue Apr 15, 2023 · 1 comment

Comments

@cartoonmangodev1
Copy link

cartoonmangodev1 commented Apr 15, 2023

Zaapa settings

{
    "prod": {
        "aws_region": "ap-south-1",
        "django_settings": "app.main.settings",
        "profile_name": "project",
        "project_name": "project-admin-backend",
        "runtime": "python3.7",
        "s3_bucket": "project-backend-api",
        "cors": true,
        "slim_handler": true,
        "memory_size": 1024,
        "exclude": [".env", "seed_data.json", "*pyc"]
    },
    "preprod": {
        "aws_region": "ap-south-1",
        "django_settings": "app.main.settings",
        "profile_name": "project",
        "project_name": "project-admin-backend",
        "runtime": "python3.7",
        "cors": true,
        "slim_handler": true,
        "s3_bucket": "project-backend-api",
        "memory_size": 1024,
        "exclude": [".env", "seed_data.json", "*pyc"]
    }
}```

Requirements

Django==3.2
djangorestframework==3.13.1
environs==9.5.0
psycopg2-binary==2.9.3
Pillow==9.2.0
djangorestframework-simplejwt==5.2.0
django-cors-headers==3.3.0
celery==5.2.7
django-ses==3.1.2
django-storages==1.13.1
django-redis-cache==3.0.1
pandas==1.3.5
pyfcm==1.5.4
qrcode==7.4.2
importlib-metadata==4.13.0
zappa==0.56.1



When try to execute zappa manage prod "check" ... This was my traceback





0230415T043909Z
x-amz-security-token:IQoJb3JpZ2luX2VjEBUaCmFwLXNvdXRoLTEiRjBEAiAa1acqBoQXOxbiIqrrH4ZDyIrdRqwwwdWMlAX4sz2nNgIgI8zuEtRmAUgi8zAVp1SOJ7Rqz/YQK32WwfKi9Ss5O1AqkwMI/v//////////ARAAGgwyNjY1OTEyODM4MzAiDH1JaqtIeqgCdEJZPyrnApt1KZdSuY6dRu9Hn/O13iC8u5vWbhSOd7pxTBHEpiA96SnphRG1xQXuGPbtaqBYJCad4mSNwai6wZLfmW09lPmQ5hY9rnh1d5XS5jasnzVewRFmn78ks6Z32rP1fBKbuVmGqRziw2DXM/j5Rdavmtcf2ArQdzWZJj9uZNyhR31x/YCT1FOOXknk9W80hiX96ZUSJmFG0eyususAJazRdIz5bXu+EOC8+VEjQvdIFdnvPq0vECg5Cci9hogJDOOTBl5CwwlZT8nuDXW9vXcA1PQB1CXQUUIRv0TSvvnUdOTn/DrH4JwFMdwXhoyrnNB7bmDpGaadX/pfw29FtO2CKtCrFBTM0XJqZAv3vnw1BzeVXe40RnIa+io6230duUY2DLrXP6WXwZYeQBqnvGYxGCltCjT15Dmq7N6D6SoYt7R7pZxu2ro5vX0lE/iiTSnqLtqN5a3+D2vlLJwPwQJzzE1hAR/TNzXKMJ7U6KEGOp4BfXH9coWUVOLJzplfzBkalNw1lS5VXMuwo6+Lmx7ufomKTeFg63qii/d4RhLOqRm2ChV7QEchWQ0NIZpQmgbvH3Y1MhucHqtkH5HGiEdnXmogZMDQ3pti8tVJJ/bgkPwdOg9qNfYhWRInqLpalUCddyhrs0jC4f9XlZQ9D97AIKH6mesW7TKv9PzHcB3w+9aK3UmU+PRglWrj10C93Lk=
host;x-amz-content-sha256;x-amz-date;x-amz-security-token
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
[DEBUG] 2023-04-15T04:39:09.852Z a9d26f60-693a-49ef-ae31-5c1c17d82b22 StringToSign:
AWS4-HMAC-SHA256
20230415T043909Z
20230415/ap-south-1/s3/aws4_request
2a86e6bfa44c779be8ca80e30662d8f4e0d553109dee16a0ca9f380b1c6ab995
[DEBUG] 2023-04-15T04:39:09.853Z a9d26f60-693a-49ef-ae31-5c1c17d82b22 Signature:
59ba1efd32d3f6e64c4374ca94e80397fa96b8bcd585f693a122f468c35affa9
[DEBUG] 2023-04-15T04:39:09.853Z a9d26f60-693a-49ef-ae31-5c1c17d82b22 Event request-created.s3.GetObject: calling handler <function add_retry_headers at 0x7f6a1537e7a0>
[DEBUG] 2023-04-15T04:39:09.853Z a9d26f60-693a-49ef-ae31-5c1c17d82b22 Sending http request: <AWSPreparedRequest stream_output=True, method=GET, url=https://project-backend-api.s3.ap-south-1.amazonaws.com/prod_project-admin-backend_current_project.tar.gz, headers={'User-Agent': b'Boto3/1.26.114 Python/3.7.16 Linux/4.14.255-301-238.520.amzn2.x86_64 exec-env/AWS_Lambda_python3.7 Botocore/1.29.114 Resource', 'X-Amzn-Trace-Id': b'Root=1-643a2a6d-539eb256603bad4f729d972b;Parent=34f0a9b81b762cc0;Sampled=0;Lineage=e64e4ea5:0', 'X-Amz-Date': b'20230415T043909Z', 'X-Amz-Security-Token': b'IQoJb3JpZ2luX2VjEBUaCmFwLXNvdXRoLTEiRjBEAiAa1acqBoQXOxbiIqrrH4ZDyIrdRqwwwdWMlAX4sz2nNgIgI8zuEtRmAUgi8zAVp1SOJ7Rqz/YQK32WwfKi9Ss5O1AqkwMI/v//////////ARAAGgwyNjY1OTEyODM4MzAiDH1JaqtIeqgCdEJZPyrnApt1KZdSuY6dRu9Hn/O13iC8u5vWbhSOd7pxTBHEpiA96SnphRG1xQXuGPbtaqBYJCad4mSNwai6wZLfmW09lPmQ5hY9rnh1d5XS5jasnzVewRFmn78ks6Z32rP1fBKbuVmGqRziw2DXM/j5Rdavmtcf2ArQdzWZJj9uZNyhR31x/YCT1FOOXknk9W80hiX96ZUSJmFG0eyususAJazRdIz5bXu+EOC8+VEjQvdIFdnvPq0vECg5Cci9hogJDOOTBl5CwwlZT8nuDXW9vXcA1PQB1CXQUUIRv0TSvvnUdOTn/DrH4JwFMdwXhoyrnNB7bmDpGaadX/pfw29FtO2CKtCrFBTM0XJqZAv3vnw1BzeVXe40RnIa+io6230duUY2DLrXP6WXwZYeQBqnvGYxGCltCjT15Dmq7N6D6SoYt7R7pZxu2ro5vX0lE/iiTSnqLtqN5a3+D2vlLJwPwQJzzE1hAR/TNzXKMJ7U6KEGOp4BfXH9coWUVOLJzplfzBkalNw1lS5VXMuwo6+Lmx7ufomKTeFg63qii/d4RhLOqRm2ChV7QEchWQ0NIZpQmgbvH3Y1MhucHqtkH5HGiEdnXmogZMDQ3pti8tVJJ/bgkPwdOg9qNfYhWRInqLpalUCddyhrs0jC4f9XlZQ9D97AIKH6mesW7TKv9PzHcB3w+9aK3UmU+PRglWrj10C93Lk=', 'X-Amz-Content-SHA256': b'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'Authorization': b'AWS4-HMAC-SHA256 Credential=ASIAT4EQUFJ3IDFCONNI/20230415/ap-south-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token, Signature=59ba1efd32d3f6e64c4374ca94e80397fa96b8bcd585f693a122f468c35affa9', 'amz-sdk-invocation-id': b'7672d133-1180-4e30-8ff4-6cff1570f65e', 'amz-sdk-request': b'attempt=1'}>
[DEBUG] 2023-04-15T04:39:09.854Z a9d26f60-693a-49ef-ae31-5c1c17d82b22 Certificate path: /var/task/certifi/cacert.pem
[DEBUG] 2023-04-15T04:39:09.854Z a9d26f60-693a-49ef-ae31-5c1c17d82b22 Starting new HTTPS connection (1): project-backend-api.s3.ap-south-1.amazonaws.com:443
2023-04-15T04:39:39.558Z a9d26f60-693a-49ef-ae31-5c1c17d82b22 Task timed out after 30.03 seconds
[END] RequestId: a9d26f60-693a-49ef-ae31-5c1c17d82b22
[REPORT] RequestId: a9d26f60-693a-49ef-ae31-5c1c17d82b22
Duration: 30033.53 ms
Billed Duration: 30000 ms
Memory Size: 1024 MB
Max Memory Used: 45 MB

Error: Unhandled error occurred while invoking command.
  
@souravjamwal77
Copy link

Hi @cartoonmangodev1 Please post this same issue in the new official Zappa repo Link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants