Hey all, this might be more of a CDK question than...
# help
b
Hey all, this might be more of a CDK question than anything. But does anybody know if there's anyway to not wait for Cloudfront Invalidations? Not a huge deal but:
Copy code
UPDATE_IN_PROGRESS | AWS::CloudFront::Distribution | AuthSPADistribution60D2FDA1 
Checking deploy status...
Checking deploy status...
Checking deploy status...
... repeat for 10 minutes
is driving me insane.
t
I can't think of a way to do this unless you make a custom resource function that triggers this for you which probably isn't worth doing
w
Maybe use versioning instead of invalidation https://stackoverflow.com/questions/57643059/how-does-versioning-work-on-amazon-cloudfront? I think Serverless Stack's StaticSite construct uses this technique
t
I think the StaticSite construct actually does create an invalidation through a custom resource
b
hmm 🤔~. You might have just pointed me in the right direction! It might not ever be my StaticSite stuff where this is happening.~ This gives me something to chase down, thanks nvm
f
Hey @brent, this is not even the Invalidations. This is just updating the CF distribution to point to a new folder in S3 bucket. The invalidation comes after this, and is done in a custom resource. The actual invalidation part we have control over and can skip. But this updating the CF distribution is done via CloudFormation.
Copy code
UPDATE_IN_PROGRESS | AWS::CloudFront::Distribution | AuthSPADistribution60D2FDA1
Are you consistently getting 10min? I’ve been seeing ~1min or lesser.
b
not always 10 minutes nope. Pretty varied actually.
probably more often around ~1 minute, I just noticed more when it's taking its time.
f
Not sure about how we are going to fix this yet, but let’s start looking for ways to speed up StaticSite deploy time.. I agree.. it’s pretty slow right now
b
thanks! fwiw, it's not a huge issue for me or anything. And can somewhat agree with thdxr on Github. Just wanted to see if there was any sort of configuration that I didn't know about.
l
@Frank are there any milestones for adding StaticSite custom domain/ssl support for domains outside of Route53? We're currently using what is called 'premium domain' by the vendor (short .co one, and a national one that is still not available in Route53:)) with no way to migrate and I've been struggling with a Custom Resource that's meant to edit the distribution configuration post creation (the cdk construct is just readonly) with no avail so far
f
Hey @Lukasz K, yes in this thread, @Warwick Grigg got a workaround working. And he’s working on a PR to make it easier https://serverless-stack.slack.com/archives/C01JG3B20RY/p1628511638307400