question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`sam deploy` for deduped build checks presence of identical build artifact many times

See original GitHub issue

Describe your idea/feature/enhancement

I sam deploy-ed 17 lambdas which shares CodeUri and Runtime (thus deduped build is enabled). Got following output:

Uploading to my-stack-name/eb7b8e83[...snip...]  17287115 / 17287115  (100.00%)
File with same data already exists at my-stack-name/eb7b8e83[...snip...], skipping upload
[... another identical 15 lines ...]

This output implies sam deploy unnecessarily uploads identical artifact.

Proposal

Ignore identical upload. It takes few seconds for each skipped upload. Ignoring identical upload can improve performance of sam deploy.

Additional Details

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
konarskiscommented, Aug 2, 2022

Thanks for looking into this guys. This is a real blocker for us, as it’s taking nearly 50 minutes to deploy the stack at times… Any way this can be prioritized?

We’ll have to switch over to CDK otherwise I’m afraid, as the release times are just too long.

Thanks again

1reaction
yskkincommented, Jul 14, 2022

https://github.com/aws/aws-sam-cli/blob/bfbcc166709dba330310088e5a5e520da1ef2444/samcli/lib/package/s3_uploader.py#L87-L89 This file_exists check take few seconds for each lambda and slows down build if deployed deduped lambda > ~10. Since we know build artifact is identical, I thought even file_exists check can be skipped.

Read more comments on GitHub >

github_iconTop Results From Across the Web

sam build - AWS Serverless Application Model
Instructs AWS SAM to build a single resource declared in the AWS SAM template. The build artifacts for the specified resource will be...
Read more >
Can I run multiple AWS sam build/deploys on the same file ...
The use case is trying to update multiple customers at once on a single build agent. It looks as though the artifacts are...
Read more >
Rome Patch 1 - ServiceNow Docs
Build your own release notes ... Check the incidents to remove. ... Use a CPU profile to check the number of times the...
Read more >
AWS re:Invent 2019 Presentations
Machine learning (ML) is a complex, iterative, often time-consuming process. ... Learn how to build and deploy computer-vision models using the AWS DeepLens ......
Read more >
A Practical Guide to Surviving AWS SAM | Claranet Italia
It's time to start talking about release change, one of my favourite topics but ... There are so many ways to build, deploy,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found