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

Incorrect CodeUri for sam build #272

Open
miparnisari opened this issue Jun 1, 2020 · 0 comments
Open

Incorrect CodeUri for sam build #272

miparnisari opened this issue Jun 1, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@miparnisari
Copy link
Contributor

miparnisari commented Jun 1, 2020

CODE_URI = "./target/{}-1.0-SNAPSHOT.jar"

This CodeUri may be correct for other SAM commands, but if you run sam build it's incorrect. See aws/aws-sam-cli#1278 (comment):

It looks like your CodeUri is a jar? It should be the directory of your source not the compiled artifact.

The error it gives:

Build Failed - Error: JavaMavenWorkflow:CopySource - [Errno 20] Not a directory: '/usr/aws-logs-loggroup/target/aws-logs-loggroup-handler-1.0-SNAPSHOT.jar

I fixed it by manually changing the template file:

CodeUri: ./target/aws-logs-loggroup-handler-1.0-SNAPSHOT.jar

to

CodeUri: .

@ammokhov ammokhov added the bug Something isn't working label Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants