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

Point lambda aws:asset:path to source code instead of .cdk.staging #2586

Closed
Gaafar opened this issue May 20, 2019 · 2 comments
Closed

Point lambda aws:asset:path to source code instead of .cdk.staging #2586

Gaafar opened this issue May 20, 2019 · 2 comments
Labels
feature-request A feature should be added or improved.

Comments

@Gaafar
Copy link
Contributor

Gaafar commented May 20, 2019

Not sure if there is a way to do this now, but when I try invoking lambda function with SAM: sam local it points to the lamda directory inside .cdk.staging dir, instead of the source code directory.

So when I change the source code SAM doesn't run the latest version on disk. I tried changing aws:asset:path: manually in the template file and it works, but maybe there should be a better way to do it instead of manual update.

@Gaafar Gaafar added the feature-request A feature should be added or improved. label May 20, 2019
@eladb
Copy link
Contributor

eladb commented May 29, 2019

You should be able to run cdk synth --no-staging to disable asset staging, in which case assets will be referenced from their original location.

Can you try and let us know if this works?

@Gaafar
Copy link
Contributor Author

Gaafar commented May 31, 2019

You should be able to run cdk synth --no-staging to disable asset staging, in which case assets will be referenced from their original location.

Can you try and let us know if this works?

Yes, that fixes it. I created a small PR to mention it in CLI docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

2 participants