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

AWS Lambda container local testing #2

Open
piotrkica opened this issue Feb 28, 2023 · 0 comments
Open

AWS Lambda container local testing #2

piotrkica opened this issue Feb 28, 2023 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@piotrkica
Copy link
Collaborator

When testing locally newly created container (for AWS) you have to change some lines in cloud_connector:

AWS Lambda compatible

result = await resp.json()

to

Local docker compatible

result = await resp.json(content_type="json")

and in wrapper.py file

AWS Lambda compatible

return {
        "statusCode": 200,
        "body": json.dumps(result),
        "headers": {
            "content-type": "application/json"
        },
        "isBase64Encoded": False
    }

to

Local docker compatible

return json.dumps(result)

Or something like that :D
It shouldn't be the case.
Find possible fix for creating AWS Lambda images that expose identical to AWS Lambda API when tested locally.

@piotrkica piotrkica added bug Something isn't working good first issue Good for newcomers labels Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant