1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
1
While I haven't seen this particular problem there is a high chance that this is a timing issue. It would be very easy to write code which creates something (target group in this case) and then tries to use that something (here, register targets with the target group) before the service control plane has had time to react.
Rather than just add a delay what I would do is query the service to see if the target group has been successfully created. If it hasn't, then wait (say, for a second) and try again. You might even perform an exponential backoff in that loop and have some condition for permanent failure (just in case).
There's an excellent article about this in the Amazon Builder's Library.
Contenus pertinents
- demandé il y a un an
- demandé il y a 5 mois
- AWS OFFICIELA mis à jour il y a 9 mois
Thanks for this. I will give it a try.