binchoo / PaimonGanyu

여행 비서 페이몬! Genshin Impact AWS workflows & KakaoTalk chatbot skills
https://pf.kakao.com/_mtPFb
GNU General Public License v3.0
7 stars 1 forks source link

[SAM] Review the cost efficiency of the CLB (stupid) #22

Closed binchoo closed 2 years ago

binchoo commented 2 years ago

As-is:

To-be: In this period of a month, user traffic was sustained meaningfully low and the CLB never created an additional EC2 instance.

binchoo commented 2 years ago

image

binchoo commented 2 years ago

The day when the CLB was removed. image

binchoo commented 2 years ago

What were you doing in July? 🤑

I realized that there had been a running ALB in the Tokyo region, no free-tier. It was somehow eventually removed. image

Estimated ELB Cost in July 2022

I'm confident that there had been one additional ALB without any traffic incoming⋯. I lost my money. That being said, I found that https://calculator.aws is very useful and so smart! image

I'll find a tool that will force regions beyond the Seoul region not to have ELB instances.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Statement1",
      "Effect": "Deny",
      "Action": [
        "elasticloadbalancing:CreateLoadBalancer",
        "elasticloadbalancing:CreateRule",
        "elasticloadbalancing:CreateListener",
        "elasticloadbalancing:CreateTargetGroup"
      ],
      "Resource": [
        "*"
      ],
      "Condition": {
        "StringNotEquals": {
          "aws:RequestedRegion": [
            "ap-northeast-2"
          ]
        }
      }
    }
  ]
}