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

Error with new shared asset bundler #212

Closed
QuinnGT opened this issue Nov 11, 2023 · 4 comments
Closed

Error with new shared asset bundler #212

QuinnGT opened this issue Nov 11, 2023 · 4 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@QuinnGT
Copy link
Contributor

QuinnGT commented Nov 11, 2023

App version: 3.1.5
Error message: Error: Bundling did not produce any output. Check that content is written to /asset-output.

Findings:

  1. I tried making a slight change to the docker build and the build works
    bundleWithAsset(assetPath: string): Asset {
        const asset = new aws_s3_assets.Asset(this, md5hash(assetPath).slice(0, 6), {
            path: assetPath,
            bundling: {
                image: DockerImage.fromBuild(path.join(__dirname, 'alpine-zip')),
                command: [
                    "sh", "-c",
                    "zip -r /asset-output/lambda.zip . && ls /asset-output"  // Added ls command for debugging
                ],
                volumes: this.sharedAssets.map(f => ({
                        containerPath: path.join(this.WORKING_PATH, path.basename(f)),
                        hostPath: f
                    })),
                workingDirectory: this.WORKING_PATH,
                outputType: BundlingOutput.ARCHIVED,
            }
        });
        return asset;
    }

However, once live on lambda I get a 400 error on the function GenAIChatBotStack-LangchainInterfaceRequestHand. Looking at the trace I see the message Unable to import module 'index': No module named 'genai_core' So pretty sure my change is getting the docker container to build but somehow missing the lib\shared\layers\python-sdk\python\genai_core

  1. I noticed the lambda.zip is showing up under lib\rag-engines\aurora-pgvector\functions\pgvector-setup after running npx cdk deploy.

Can't seem to figure it out yet but I'll keep trying. Any help would be appreciated.

@QuinnGT
Copy link
Contributor Author

QuinnGT commented Nov 17, 2023

@massi-ang just an fyi in case you haven't seen this issue but I'm unable to do a fresh build on the 3.1.5 release or the new release. It's really this error Error: Bundling did not produce any output. Check that content is written to /asset-output. as the cdk is creating a file here aws-genai-llm-chatbot\lib\rag-engines\opensearch-vector\functions\create-workflow\create\asset-outputasset.zip.

Is the build working for you and others or is there some new config I need to do?

@QuinnGT
Copy link
Contributor Author

QuinnGT commented Nov 17, 2023

Just figured out it's due to the unix style path and I'm trying to deploy via powershell in vscode on windows. Deploy worked fine on my mac, so I'll work from that from now on but a cross-platform path with something like path.normalize() would be ideal.

@massi-ang massi-ang added the bug Something isn't working label Nov 17, 2023
@massi-ang massi-ang moved this to Backlog in AWS GenAI Chatbot Nov 17, 2023
@massi-ang massi-ang added the good first issue Good for newcomers label Nov 17, 2023
@massi-ang
Copy link
Collaborator

Thanks @QuinnGT for raising this issue. We would be more than happy to have you contribute to the repo by fixing this issue. Let us know if this is something you would like to do.

@QuinnGT
Copy link
Contributor Author

QuinnGT commented Dec 1, 2023

Found the error here aws/aws-cdk#19270. Testing the fix now.

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
Status: Done
Development

No branches or pull requests

2 participants