Skip to content

Instantly share code, notes, and snippets.

@januszm
Last active July 3, 2026 15:14
Show Gist options
  • Select an option

  • Save januszm/34522a6c14769769aac85862d49b2a27 to your computer and use it in GitHub Desktop.

Select an option

Save januszm/34522a6c14769769aac85862d49b2a27 to your computer and use it in GitHub Desktop.
AWS Elastic Beanstalk update Health check path
PROF=yourprofile
aws elasticbeanstalk update-environment \
--environment-name "$PROF-production" \
--option-settings \
Namespace=aws:elasticbeanstalk:environment:process:default,OptionName=HealthCheckPath,Value=/health \
Namespace=aws:elasticbeanstalk:environment:process:default,OptionName=MatcherHTTPCode,Value=200 \
--profile "$PROF" --region us-east-2
# confirm with
LB=$(aws elasticbeanstalk describe-environment-resources --environment-name "$PROF-production" \
--profile "$PROF" --region us-east-2 \
--query "EnvironmentResources.LoadBalancers[0].Name" --output text)
aws elbv2 describe-target-groups --load-balancer-arn "$LB" \
--profile "$PROF" --region us-east-2 \
--query "TargetGroups[].{TG:TargetGroupName,Path:HealthCheckPath,Matcher:Matcher.HttpCode}" \
--output table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment