-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(s3-deployment): exclude and include filters #16054
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Please change API to support more than a single exclude/include pattern
@eladb I just realized I missed the README update, but I see that you already tackled that. Apologies for not catching that in the update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just realized something - AssetOptions
also have support for exclusions, which are also taken into account when calculating the asset hash (and therefore invalidate the asset appropriately). @davidtucker I am wondering if using exclusions at the asset level is sufficient and addresses your use case. What do we gain from adding this at the deployment time?
@eladb The main issue here (that led to me creating this PR) is that I want to exclude files from being pruned in the destination bucket. In my original use case, I have two things in a bucket:
Using the S3 CLI, this is east to manage. You can set it to prune with |
OK, makes sense. Can you please add a note in the docs for |
Thanks for the awesome contribution @davidtucker |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
This construct only enables integration with the two existing CLI options (`--exclude` and `--include`) that are supported for the `s3 sync` command. There are a few situations where this can prove valuable: 1. Situations where you want to deploy a subset of files from an archive - This can be handled by leveraging the bundling option for a source, although in some situations the `exclude` filter would be significantly easier. 2. Situations where you want to leverage `prune` but have specific files excluded - This is the situation that cannot be solved with current tools. The most common scenario (and one I detailed in aws#14362 ) is where you manage a web app config file with a custom CloudFormation resource (to pass in API endpoint, user pool, etc...) and then manage a web application using this construct. Closes aws#14362 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This construct only enables integration with the two existing CLI options (`--exclude` and `--include`) that are supported for the `s3 sync` command. There are a few situations where this can prove valuable: 1. Situations where you want to deploy a subset of files from an archive - This can be handled by leveraging the bundling option for a source, although in some situations the `exclude` filter would be significantly easier. 2. Situations where you want to leverage `prune` but have specific files excluded - This is the situation that cannot be solved with current tools. The most common scenario (and one I detailed in aws#14362 ) is where you manage a web app config file with a custom CloudFormation resource (to pass in API endpoint, user pool, etc...) and then manage a web application using this construct. Closes aws#14362 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This construct only enables integration with the two existing CLI options (`--exclude` and `--include`) that are supported for the `s3 sync` command. There are a few situations where this can prove valuable: 1. Situations where you want to deploy a subset of files from an archive - This can be handled by leveraging the bundling option for a source, although in some situations the `exclude` filter would be significantly easier. 2. Situations where you want to leverage `prune` but have specific files excluded - This is the situation that cannot be solved with current tools. The most common scenario (and one I detailed in aws#14362 ) is where you manage a web app config file with a custom CloudFormation resource (to pass in API endpoint, user pool, etc...) and then manage a web application using this construct. Closes aws#14362 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This construct only enables integration with the two existing CLI options (`--exclude` and `--include`) that are supported for the `s3 sync` command. There are a few situations where this can prove valuable: 1. Situations where you want to deploy a subset of files from an archive - This can be handled by leveraging the bundling option for a source, although in some situations the `exclude` filter would be significantly easier. 2. Situations where you want to leverage `prune` but have specific files excluded - This is the situation that cannot be solved with current tools. The most common scenario (and one I detailed in aws#14362 ) is where you manage a web app config file with a custom CloudFormation resource (to pass in API endpoint, user pool, etc...) and then manage a web application using this construct. Closes aws#14362 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This construct only enables integration with the two existing CLI options (
--exclude
and--include
) that are supported for thes3 sync
command. There are a few situations where this can prove valuable:exclude
filter would be significantly easier.prune
but have specific files excluded - This is the situation that cannot be solved with current tools. The most common scenario (and one I detailed in (aws-s3-deployment): Support include and exclude options for S3 sync #14362 ) is where you manage a web app config file with a custom CloudFormation resource (to pass in API endpoint, user pool, etc...) and then manage a web application using this construct.Closes #14362
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license