2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ALBで開閉局

2
Posted at

AWSでオンプレで時間で実行していたWEBの開閉局をしたい

オンプレでは負荷分散装置にコマンド実行して開閉局していた(例:8:00開局 22:00閉局、閉局以降はSorryサーバへ)
同じことをAWSでやってみたい。
→ALBならできそう

-ALBのターゲットグループを2つつくる

-ルールでターゲットグループ2つを同じパスで設定
image.png

-コマンドでルールのPriorityを切り替える

上げる

aws elbv2 set-rule-priorities ----rule-priorities RuleArn=arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxxxxxx:listener-rule/app/test-alb/4f5a94a89exxxxxx/9244436cecxxxxxx/2aff9175ddxxxxxx,Priority=1

下げる

aws elbv2 set-rule-priorities ----rule-priorities RuleArn=arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxxxxxx:listener-rule/app/test-alb/4f5a94a89exxxxxx/9244436cecxxxxxx/2aff9175ddxxxxxx,Priority=5

でできたみたいに見える
priorityの設定は適当に大きい数字を設定すると空いている次の値になった(下げるときに5としているが実際は2になった)

2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?