title: Script to attach and detach server from the load balancer in amazon aws
body: <p>I am using the below Script to attach and detach the server from load balancer</p>
  
  <pre><code>#!/bin/bash
  aws elb register-instances-with-load-balancer --load-balancer-name Load-BalancerLoadBalancer --instances i-a3f1446e
  
  aws elb deregister-instances-from-load-balancer --load-balancer-name Load-BalancerLoadBalancer --instances i-a3f1446e
  </code></pre>
  
  <p>When I am running the script I am getting the error as below</p>
  
  <pre><code>Service elasticloadbalancing not available in region ap-southeast-1b
  Service elasticloadbalancing not available in region ap-southeast-1b
  </code></pre>
  
  <p>Is there any changes I want to make the script working or Is there any alternate script to do the work.</p>