Skip to content

java: Lambda Code.asset does not recognize jar as a zip file #1294

Closed
@thesurlydev

Description

I attempted to create a Lambda function and passing a path to a jar file to the withCode and got an exception: Asset must be a .zip file or a directory.

The asset validation should pass if the path points to a valid jar file (which is essentially a zip file).

As a workaround I found that by simply renaming the file from app.jar to app.zip gets past the validation.

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/assetsRelated to the @aws-cdk/assets packagebugThis issue is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions