Skip to content

Cannot attach certificates to Lightsail container services

0

My certificate on my container service was expired and I needed to replace it manually what I wondered about already. I removed it from my account and created a new certificate with my custom domain. The validation as successful, so the certificate is in my account and the status is "Valid, not in use". But at any container service, I cannot attach it to that. I duplicated the container service deployment and tried to create and attach a certificate there, but the link "Attach certificate (0 available)" is greyed out and says:

"You have no available certificates in this AWS Region. Create a certificate to use custom domains with your container service."

I checked the region of the certificates and container services. All of them are in Frankfurt. So I don't understand, why an attachment is not possible. I however can still create new certificates.

asked a year ago281 views
2 Answers
1
Accepted Answer

Hi there,

It seems like you’re having trouble attaching a certificate to your Lightsail container service. Here’s how you can fix it:

Quick Fixes:

  1. Double-Check Regions: Make sure both the certificate and the container service are in the same region (Frankfurt). Even a small mismatch can cause this issue.

  2. Wait for Propagation: If the certificate is new, give it some time to fully propagate across AWS. Sometimes it just needs a few more minutes.

  3. Restart the Service: Try restarting or redeploying your container service. This can help refresh its state and recognize the certificate.

  4. Use AWS CLI: If the console isn’t working, try attaching the certificate via the AWS CLI. It’s a more direct approach that can sometimes bypass console issues.

Hope this helps! 😁

answered a year ago
0

Thank you Daher,

it was possible with the AWS CLI. I used the following command: aws lightsail update-container-service --service-name mycontainer --public-domain-names '{"Certificate-name": ["custom.domain.com"]}'

The docs at https://docs.aws.amazon.com/de_de/lightsail/latest/userguide/amazon-lightsail-adding-distribution-default-domain-to-container-service.html helped, but not the documentation of the aws cli: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lightsail/update-container-service.html That didn't specify, what the Key should be....

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.