amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

--invalidateCloudFront not working

Open dmitrybndar opened this issue 7 years ago • 5 comments

Describe the bug I have a same amplify project on two computers - PC (win 10) and MacBook. Everything worked well on both, until I re-install windows on my PC, from that moment "--invalidateCloudFront" or "-c" flag dont dont work as expected on PC (on Mac still works well). I see message "CloudFront invalidation request sent successfuly." in console, but when I go to AWS CloudFront service and open "Invalidations" tab (in my distribution) there is no new invalidation, and CloudFront url of my project has cached files (old) until I create invalidation manually in "Invalidations" tab.

To Reproduce I don't now how to reproduce it, cause its work well on macbook, and on my previous windows setup.

Expected behavior "amplify publsh --invalidateCloudFront" command from my PC (win 10) creates new invalidation in cloud front

Screenshots image

Desktop (please complete the following information):

  • OS: Windows 10

Additional context Thats probably not the issue with CLI, mb I do something wrong, but I tried a lot of things already such as re-install amplify-cli (different versions), cloning project from git in another folder and run "ampify configure", "ampify init" in it, making new aws profiles... but all unsuccessfully. Hope you can help me. Thanks!

dmitrybndar avatar May 30 '19 10:05 dmitrybndar

Hi @dmitrybndar If you see the "CloudFront invalidation request sent successfully." message, that means the invalidation request has been sent to CloudFront. There might be some delay till it shows up in the CloudFront's web console. The update of the actual contents in the CloudFront edges will take even more time. We are not ruling out that this is a possible bug at this moment, though. What is the version of the installed Amplify CLI on your Windows 10 machine? so we can investigate further.

UnleashedMind avatar May 30 '19 19:05 UnleashedMind

Hi @UnleashedMind Thanks for helping on this. Invalidation didnt show in web console even after a couple of days. But again - when I do the same from macbook (and did on previuos setup of win10) - invalidation appears in web console almost instantly after I see "CloudFront invalidation request sent successfully." in my terminal. I tried different versions of Amplify CLI - 1.5.3; 1.6.3; 1.6.5 (thats is what I have on mac also); 1.6.11. But I have this problem with all of them. Thanks, again

dmitrybndar avatar May 30 '19 20:05 dmitrybndar

Thanks @dmitrybndar I think I've found the bug, will send a fix soon.

UnleashedMind avatar May 30 '19 20:05 UnleashedMind

@UnleashedMind I've added your fix in package manually, and it works! Thanks a lot for resolving it so fast! )

dmitrybndar avatar May 30 '19 21:05 dmitrybndar

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

github-actions[bot] avatar May 27 '21 08:05 github-actions[bot]