Yuval Ron
12/17/2021, 12:12 PMFrank
/health
in a Post-Deploy Phase?Frank
Yuval Ron
12/20/2021, 9:00 AMFrank
How do I resolve the deployed host url?You can add the URL as a stack output named
HealthURL
. And in the Post Deploy phase you can look up the output value of HeathURL
using AWS SDK and curl:
echo "export HealthURL=$(aws cloudformation describe-stacks --stack-name my-stack --query 'Stacks[0].Outputs[?OutputKey==`HealthURL`].OutputValue | [0]' --output text)" >> $BASH_ENV
curl $HealthURL
Is there a way to apply this phase globally and automatically to all new deployments?If you set up Post-Deploy Phase, it applies to all new deployments