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

AWS::Lambda::Function should store relative path instead of absolute path #2096

Closed
JoHuang opened this issue Mar 26, 2019 · 1 comment · Fixed by #2182
Closed

AWS::Lambda::Function should store relative path instead of absolute path #2096

JoHuang opened this issue Mar 26, 2019 · 1 comment · Fixed by #2182
Labels
@aws-cdk/aws-lambda Related to AWS Lambda

Comments

@JoHuang
Copy link

JoHuang commented Mar 26, 2019

After checking out repo on different machine, cdk diff shows

Resources
[~] AWS::Lambda::Function AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62c AdoptEcrRepositorydbc60defc59544bcaa5c28c95d68f62c52BE89E9 
 └─ [~] Metadata
     └─ [~] .aws:asset:path:
         ├─ [-] /Users/apple/GitProject/hello-cdk/node_modules/@aws-cdk/assets-docker/lib/adopt-repository
         └─ [+] /Users/apple/GitProject/ECS_Cluster_CDK/node_modules/@aws-cdk/assets-docker/lib/adopt-repository

which cause unnecessary deployment.

@eladb
Copy link
Contributor

eladb commented Mar 28, 2019

Yes definitely on our radar.

@debora-ito debora-ito added the @aws-cdk/aws-lambda Related to AWS Lambda label Mar 29, 2019
eladb pushed a commit that referenced this issue Apr 8, 2019
To ensure that assets are available for the toolchain to deploy after the CDK app
exists, the CLI will, by default, request that the app will stage the assets under
the `.cdk.assets` directory (relative to working directory).

The CDK will then *copy* all assets from their source locations to this staging
directory and will refer to the staging location as the asset path. Assets will
be stored using their content fingerprint (md5 hash) so they will never be copied
twice unless they change.

Docker build context directories will also be staged.

Staging is disabled by default and in cdk-integ.

Added .cdk.staging to all .gitignore files in cdk init templates.

Fixes #1716
Fixes #2096
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda Related to AWS Lambda
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants