by shigemk2

当面は技術的なことしか書かない

ELB quota

ELBのリスナールールをCloudFormationで作ろうとしたときにValidationExceptionが出たので、CloudTrailで確認するとCreateRuleで以下のようなエラーメッセージが出ていた(ValidationExceptionだけじゃわからないっていう)。

(日付とか省略)

    "eventSource": "elasticloadbalancing.amazonaws.com",
    "eventName": "CreateRule",
    "errorCode": "ValidationException",
    "errorMessage": "A rule can only have '5' condition values",

ルールの条件でvalueを5つより多く設定しようとすると、「ルールあたりの条件値」に引っ掛かり、エラーになる。そしてこの値は引き上げることができない。 docs.aws.amazon.com

CloudFront オリジンリクエスト

CloudFront へのビューワーリクエストにより、キャッシュミス (リクエストされたオブジェクトがエッジロケーションでキャッシュされない) が発生した場合、CloudFront はオブジェクトを取得するためのリクエストをオリジンに送信します。これは、オリジンリクエストと呼ばれます。

docs.aws.amazon.com

CloudFront オリジンリクエストとキャッシュのポリシー

細かく設定するのがしんどいのでマネージドで特定のユースケースに最適化された設定を利用できるようになった。 とはいえレガシー設定も生きているので、理論上は管理ポリシーの値に合わせたレガシー設定も設定することはできる。

docs.aws.amazon.com

docs.aws.amazon.com

CloudFormation ListenerRule

ListenerArnはRefで取れたりする。

  ListenerRule1:
    Type: 'AWS::ElasticLoadBalancingV2::ListenerRule'
    Properties:
      Actions:
        - Type: forward
          TargetGroupArn: !Ref TargetGroup1
      Conditions:
        - Field: http-header
          HttpHeaderConfig:
            HttpHeaderName: User-Agent
            Values:
              - Mozilla
        - Field: http-header
          HttpHeaderConfig:
            HttpHeaderName: Referer
            Values:
              - 'https://www.amazon.com/'
      ListenerArn: !Ref Listener
      Priority: 1
  Listener:
    Type: 'AWS::ElasticLoadBalancingV2::Listener'
    Properties:
      DefaultActions:
        - Type: forward
          TargetGroupArn: !Ref TargetGroup1
      LoadBalancerArn: !Ref LoadBalancer
      Port: '8000'
      Protocol: HTTP
 ```

[https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html:embed:cite]



[https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listenerrule.html:embed:cite]

brew 3.5.9

  • linux/keg_relocate: remove patchelf exemption
  • update-report: reset version_scheme only for runtime dependents
  • docs: document CI versions of Ubuntu
  • Run periodic cleanup after installing all packages
  • check whether token is multiple tap's name
  • brew.rb: tell users to fix head issues with inreplace
  • brew search --verbose to tell about brew desc
  • language/python: use versioned Python name in detected_python_shebang
  • Add arch cask DSL
  • Remove arch from cask stanza ordering temporarily
  • Fix nil handling in arch cask DSL

github.com