AWSLexKoiosBlogDemo/src/lex-gen-ai-demo-cdk
- app.py
- cdk.json
- endpoint_handler.py
- upload_file_to_s3.py
- shutdown_endpoint.py
- index-creation-docker-image/
- index_creation_app.py
- Dockerfile
- index_creation_requirements.txt
- lex_gen_ai_demo_cdk_files/
- __init__.py
- lex_gen_ai_demo_file_stack.py
- lex-gen-ai-demo-docker-image/
- runtime_lambda_app.py
- Dockerfile
- runtime_lambda_requirements.txt
- requirements.txt
- source.bat
Solution: You must set an aws region with export AWS_DEFAULT_REGION=<your-region>
botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the CreateRole operation: User: <user-arn> is not authorized to perform: iam:CreateRole on resource: <role-arn> because no identity-based policy allows the iam:CreateRole action
Solution: you must ensure the Iam role you are using has sufficient permissions to create Iam roles
Issue: Error while building the image. Here are some common ones
Issue: Docker has run out of memory due to too many images Solution: Delete unused images in the Docker application and then prune docker in command line
Issue: Pip issue
Solution: Clear pip cache (python3 -m pip cache purge
) and run again