Closed owboateng closed 3 years ago
Please post your serverless.yml
file and try running with serverless --debug
to get more logs so we know where it is failing.
If you are using domain, it should dynamically try to find the certificate by domain name: https://github.com/serverless-nextjs/serverless-next.js/blob/0c912709da09ac95ffcdd46f60e922c4ef6b5fc2/packages/serverless-components/domain/serverless.js#L61-L68, unless you specified certificateArn
as well. Though I believe the ARN doesn't change when AWS renews the certificate.
Thanks for the response but I have been able to fix the issue by just manually invalidating the CloudFront cache before deployment.
I think this could be an improvement that can be automated into serverless-next.js by invalidating the CloudFront cache if an existing certificate becomes invalid and retry. This I believe will save developers a lot of time.
Thank you.
Describe the bug
I am getting
InvalidViewerCertificate: The specified SSL certificate doesn't exist, isn't in us-east-1 region, isn't valid, or doesn't include a valid certificate chain
. when I try to update my deployment. I received an email from AWS this morning that the custom ACM certificate associated with my NextJs Cloudfront (with custom domain) has been renewed. After this I am not able to push any changes anymore.Actual behavior
Expected behavior
I expect the renewed certificate to be used. I did not change anything. The certificate was just renewed.
Steps to reproduce
I do not know how this can be easily reproduced:
Screenshots/Code/Logs
Versions
Additional context
The certificate exists and it is in the right region (us-east-1)
Checklist
@sls-next/serverless-component
release version, which may have already fixed your issue. Note that the oldserverless-next.js
component and theserverless-next.js
plugin are deprecated and no longer maintained.