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

Add ability to invalidate cloudfront assets #920

Closed
mslinn opened this issue Sep 23, 2014 · 16 comments · Fixed by #1662
Closed

Add ability to invalidate cloudfront assets #920

mslinn opened this issue Sep 23, 2014 · 16 comments · Fixed by #1662
Labels
feature-request A feature should be added or improved.

Comments

@mslinn
Copy link

mslinn commented Sep 23, 2014

Using s3cmd I can write:

s3cmd -P --cf-invalidate put filename s3://bucket/path/filename

A similar option for aws s3 cp/sync would be helpful.

@jamesls jamesls added the feature-request A feature should be added or improved. label Sep 26, 2014
@aalbertson
Copy link

+1

1 similar comment
@mmautner
Copy link

+1

@kaihendry
Copy link

The workaround IIUC is aws cloudfront create-invalidation

aws cloudfront create-invalidation --distribution-id XXXXXXXXXXXXX \
--invalidation-batch "{ \"Paths\": { \"Quantity\": 1, \"Items\": [ \"/*\" ] }, \"CallerReference\": \"$(shell date +%s)\" }"

http://docs.aws.amazon.com/cli/latest/reference/cloudfront/create-invalidation.html

Which is awkward to use.

@mslinn
Copy link
Author

mslinn commented Jun 22, 2015

I am now using the cloudfront-invalidator command line. It's crazy that this issue remains unresolved for aws-cli. No, I don't want to create JSON for a simple task.

@aronwoost
Copy link

+1

2 similar comments
@svickers
Copy link

svickers commented Sep 2, 2015

+1

@babineaum
Copy link

👍

@mtdowling
Copy link
Member

Thanks for the feature request. Just want to let you know that we hear you and have added a note to our backlog to look into this.

@ghost
Copy link

ghost commented Nov 25, 2015

+1

@varsy
Copy link

varsy commented Nov 25, 2015

+1, that would be super awesome to use the official tool instead of s3cmd.

@jamesls
Copy link
Member

jamesls commented Dec 3, 2015

Looks like the PR wasn't linked to this issue.

PR: #1662

If you have any feedback on the proposed interface, feel free to comment on the PR.

@kaihendry
Copy link

I was hoping that say upon a aws s3 sync it could invalidate the paths that changed. I usually invalidate the whole cache since I am too lazy to find the path of what changed manually.

I'm not sure what or if there is a cost associated to invalidating the whole cache as opposed to the path.

@rayluo
Copy link
Contributor

rayluo commented Dec 7, 2015

Thanks for the suggestion @kaihendry . We did think about the possibility of closer integration with the aws s3 sync. One of the potential concern is about the price. Imagining you sync thousands of objects to your S3 bucket, if your tool literally invalidate all these objects for you, you could possibly end up with extra cost. (See "Paying for Object Invalidation" for details.) On the contrary, manually sending only one invalidation request with wildcard is sometimes a better choice.

We will definitely keep seeking better solution for the this feature. Meanwhile we are also exciting to provide the long-awaited fundamental feature as a solid first step. Thank you everyone again, for all your support and patience.

@aronwoost
Copy link

Thanks for tackling this issue!

Just like @kaihendry I want to point out, that this issue is not fixed in the sense of the original request and the people 👍'ing. The "fix" added some syntactic sugar to aws cloudfront create-invalidation, nothing more.

This ticket is actually about not needing to deal with manual invalidation. Exactly the opposite, aws s3 sync --cf-invalidate should invalidate CloudFront if files were synced. That would be really helpful.

Should I create a separate ticket for that?

@mslinn
Copy link
Author

mslinn commented Jan 2, 2016

@aronwoost is exactly right! This issue should not have been closed.

@staff0rd
Copy link

Agree, please re-open.

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

Successfully merging a pull request may close this issue.