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

support new ephemeral storage feature in zappa_settings.json #1120

Closed
elip-OE opened this issue Apr 3, 2022 · 13 comments
Closed

support new ephemeral storage feature in zappa_settings.json #1120

elip-OE opened this issue Apr 3, 2022 · 13 comments
Labels
auto-closed [Bot] Closed, details in comments has-pr next-release-candidate no-activity [Bot] Closing soon if no new activity

Comments

@elip-OE
Copy link

elip-OE commented Apr 3, 2022

Context

Few days ago AWS released new feature to support /tmp storage up to 10GB link
I wish there whould be an option to set it as part of the zappa_settings.json file

Expected Behavior

{
    "stage": {
        ...
        "ephemeral_storage": 10240  # MBs
    }
}

would set my function to 10GB storage on /tmp

Actual Behavior

N/A

Possible Fix

N/A

Steps to Reproduce

N/A

Your Environment

N/A

@mdw123
Copy link

mdw123 commented May 27, 2022

👍🏻

@souravjamwal77
Copy link
Collaborator

Hi @elip-OE and @mdw123,
Does this setting work?

@mdw123
Copy link

mdw123 commented Jun 6, 2022

The PR is still open, so I expect no. I resorted to this in my CI pipeline:

zappa update ...
sleep 30
aws lambda update-function-configuration --region ${region} --function-name ${function_name} --ephemeral-storage '{"Size": 1536}'

I don't know that this requires a full 30 seconds, but zappa update immediately followed by the configuration update returned an error that the lambda was still updating.

@souravjamwal77
Copy link
Collaborator

Thanks @mdw123 for your suggestion
However, I started using Docker for the same and it's better than using ephemeral storage.
If you want any help feel free to ping me

@elip-OE
Copy link
Author

elip-OE commented Jun 7, 2022

@souravjamwal77 docker image may not be an option. I've tested PR #1125 and it works fine.

@souravjamwal77
Copy link
Collaborator

Thanks @elip-OE
I will test that out and will ping @jneves for merging.

wangsha added a commit to wangsha/Zappa that referenced this issue Jun 15, 2022
Support AWS Lambdas ephemeral storage setting (zappa#1120)
elip-OE added a commit to elip-OE/Zappa that referenced this issue Aug 3, 2022
Support AWS Lambdas ephemeral storage setting (zappa#1120)
@elip-OE
Copy link
Author

elip-OE commented Aug 4, 2022

@souravjamwal77 can you share you docker based solution?

@souravjamwal77
Copy link
Collaborator

souravjamwal77 commented Aug 4, 2022

Yeah sure below is my Dockerfile code
let me know if you need anything else

FROM amazon/aws-lambda-python:3.8




ARG FUNCTION_DIR="/var/task/"

COPY ./ ${FUNCTION_DIR}

RUN pip install wheel
RUN pip install -r requirements.txt

# Grab the zappa handler.py and put it in the working directory
RUN ZAPPA_HANDLER_PATH=$( \
    python -c "from zappa import handler; print (handler.__file__)" \
    ) \
    && echo $ZAPPA_HANDLER_PATH \
    && cp $ZAPPA_HANDLER_PATH ${FUNCTION_DIR}


CMD [ "handler.lambda_handler" ]

@elip-OE ping me if you need any further help

If you need help with deployment script (and that's not perfect, but works) let me know

@elip-OE
Copy link
Author

elip-OE commented Aug 4, 2022

@souravjamwal77 thanks for your help. I have very similar Dockerfile, but I don't have a write permission to any directory. have you done anything to allow more storage?

@issamemari
Copy link

I'm interested in this feature

@souravjamwal77
Copy link
Collaborator

@souravjamwal77 thanks for your help. I have very similar Dockerfile, but I don't have a write permission to any directory. have you done anything to allow more storage?

This issue has been marked as nest-release-candidate and will be added in the next release.

Copy link

github-actions bot commented Apr 3, 2024

Hi there! Unfortunately, this Issue has not seen any activity for at least 90 days. If the Issue is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed.

@github-actions github-actions bot added the no-activity [Bot] Closing soon if no new activity label Apr 3, 2024
Copy link

Hi there! Unfortunately, this Issue was automatically closed as it had not seen any activity in at least 100 days. If the Issue is still relevant to the latest version of Zappa, please open a new Issue.

@github-actions github-actions bot added the auto-closed [Bot] Closed, details in comments label Apr 13, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-closed [Bot] Closed, details in comments has-pr next-release-candidate no-activity [Bot] Closing soon if no new activity
Projects
None yet
Development

No branches or pull requests

5 participants