aws-samples / aws-lex-conv-faq

Demonstration of LLM integration into a lex bot using Lambda codehooks and a Sagemaker endpoint.
MIT No Attribution
11 stars 6 forks source link

MemorySize issue with lambda function #9

Open alifatmi opened 1 year ago

alifatmi commented 1 year ago

while running the code in the step of "cdk deploy LexGenAIDemoFilesStack" i receive error , below is the error

❌ LexGenAIDemoFilesStack failed: Error: The stack named LexGenAIDemoFilesStack failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Resource handler returned message: "'MemorySize' value failed to satisfy constraint: Member must have value less than or equal to 3008 (Service: Lambda, Status Code: 400, Request ID: c44f0e2d-457d-4c11-837e-35da515dfa2f)

how to resolve it, i also requested in service quota of lambda service to increase concurrency , but after increment still problem is there.

alifatmi commented 12 months ago

in code lex_gen_ai_demo_cdk_files/lex_gen_ai_demo_cdk_files_stack.py where memory_size=10240. change to 3000 then it will run.

carbonless commented 7 months ago

Once you get the Lambda Functions up and running both 'read-source-and-build-index-fn' and 'lex-codehook-fn' hit a local storage limit.

you need to modify their local /tmp from 512 to 1024:

for example - aws lambda update-function-configuration --function-name lex-codehook-fn --ephemeral-storage '{"Size": 10240}'

Then they run.