{"id":7663,"date":"2024-03-30T13:30:48","date_gmt":"2024-03-30T04:30:48","guid":{"rendered":"https:\/\/www.clara.jp\/media\/?p=7663"},"modified":"2025-10-10T14:28:00","modified_gmt":"2025-10-10T05:28:00","slug":"aws%e3%81%a7sorry%e3%83%9a%e3%83%bc%e3%82%b8%e3%81%ae%e5%ae%9f%e8%a3%85%ef%bc%9aroute53%e3%81%ab%e3%82%88%e3%82%8b%e3%83%95%e3%82%a7%e3%83%bc%e3%83%ab%e3%82%aa%e3%83%bc%e3%83%90%e3%83%bc%e8%a8%ad","status":"publish","type":"post","link":"https:\/\/ci.clara.jp\/media\/?p=7663","title":{"rendered":"AWS\u3067Sorry\u30da\u30fc\u30b8\u306e\u5b9f\u88c5\uff1aRoute53\u306b\u3088\u308b\u30d5\u30a7\u30fc\u30eb\u30aa\u30fc\u30d0\u30fc\u8a2d\u5b9a"},"content":{"rendered":"\n<p><span style=\"font-weight: 400;\">\u3053\u3093\u306b\u3061\u306f\u3001TAM\u306e\u77f3\u5ddd\u3067\u3059\u3002<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Web\u30b5\u30a4\u30c8\u304c\u969c\u5bb3\u3084\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u3067\u505c\u6b62\u3057\u3066\u3044\u308b\u969b\u306b\u8868\u793a\u3059\u308bSorry\u30da\u30fc\u30b8\u3092AWS\u4e0a\u3067\u5207\u308a\u66ff\u3048\u308b\u65b9\u6cd5\u3068\u3057\u3066\u3001CloudFront\u306e\u30ab\u30b9\u30bf\u30e0\u30a8\u30e9\u30fc\u30da\u30fc\u30b8\u3092\u5229\u7528\u3059\u308b\u30b1\u30fc\u30b9\u304c\u591a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">\u4eca\u56de\u306f\u3001Route53\u3092\u6d3b\u7528\u3057\u3066\u540c\u3058\u3053\u3068\u304c\u3067\u304d\u308b\u304b\u3092\u691c\u8a3c\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><b>Sorry\u30da\u30fc\u30b8\u306e\u5b9f\u73fe\u65b9\u6cd5<\/b><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">AWS\u3067Sorry\u30da\u30fc\u30b8\u3092\u5b9f\u73fe\u3059\u308b\u65b9\u6cd5\u306f\u3044\u304f\u3064\u304b\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>CloudFront\u306e\u30ab\u30b9\u30bf\u30e0\u30a8\u30e9\u30fc\u30da\u30fc\u30b8\u3092\u5229\u7528<\/b><span style=\"font-weight: 400;\">\uff08\u4efb\u610f\u306e\u30da\u30fc\u30b8\u3092\u8868\u793a\u53ef\u80fd\uff09<\/span><\/li>\n\n\n\n<li><b>ALB\u306eRule\u8a2d\u5b9a<\/b><span style=\"font-weight: 400;\">\uff08\u30ab\u30b9\u30bf\u30e0\u30da\u30fc\u30b8\u306e\u8868\u793a\u53ef\u3002\u305f\u3060\u3057256\u30d0\u30a4\u30c8\u306e\u30b5\u30a4\u30ba\u5236\u9650\u3042\u308a\uff09<\/span><\/li>\n\n\n\n<li><b>Route53\u306e\u30d5\u30a7\u30fc\u30eb\u30aa\u30fc\u30d0\u30fc\u8a2d\u5b9a\u3092\u5229\u7528<\/b><\/li>\n<\/ul>\n\n\n\n<p><span style=\"font-weight: 400;\">\u4eca\u56de\u306f\u3001\u3042\u307e\u308a\u6d3b\u7528\u3055\u308c\u3066\u3044\u306a\u3044Route53\u3092\u4f7f\u3063\u305f\u8a2d\u5b9a\u3092\u8a66\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><b>Route53\u306e\u30d5\u30a7\u30fc\u30eb\u30aa\u30fc\u30d0\u30fc\u8a2d\u5b9a\u306e\u4ed5\u7d44\u307f<\/b><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">Route53\u306fDNS\u306e\u30b5\u30fc\u30d3\u30b9\u3067\u3042\u308a\u3001\u8907\u96d1\u306a\u51e6\u7406\u306f\u3067\u304d\u307e\u305b\u3093\u304c\u3001DNS\u306e\u30ec\u30b3\u30fc\u30c9\u5fdc\u7b54\u3092\u5236\u5fa1\u3059\u308b\u4ee5\u4e0b\u306e2\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Failover\uff08\u30d5\u30a7\u30fc\u30eb\u30aa\u30fc\u30d0\u30fc\uff09<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">1\u3064\u306eDNS\u30ec\u30b3\u30fc\u30c9\u306b\u5bfe\u3057\u3001\u30d7\u30e9\u30a4\u30de\u30ea\u3068\u30bb\u30ab\u30f3\u30c0\u30ea\u3092\u8a2d\u5b9a\u3057\u3001\u305d\u308c\u305e\u308c\u306b\u30d8\u30eb\u30b9\u30c1\u30a7\u30c3\u30af\u3092\u7528\u610f\u3057\u307e\u3059\u3002 \u30d7\u30e9\u30a4\u30de\u30ea\u306e\u30d8\u30eb\u30b9\u30c1\u30a7\u30c3\u30af\u304c\u5931\u6557\u3059\u308b\u3068\u3001\u30bb\u30ab\u30f3\u30c0\u30ea\u306e\u30ec\u30b3\u30fc\u30c9\u3078\u5207\u308a\u66ff\u308f\u308b\u4ed5\u7d44\u307f\u3067\u3059\u3002<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">\u203b\u30d7\u30e9\u30a4\u30de\u30ea\u306f1\u3064\u306e\u307f\u767b\u9332\u53ef\u80fd\u3067\u3059\u3002<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Weight\uff08\u91cd\u307f\u4ed8\u3051\uff09<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Route53\u306e\u512a\u5148\u5ea6\u4ed8\u3051\u6a5f\u80fd\u3092\u6d3b\u7528\u3057\u3001\u540c\u3058\u30ec\u30b3\u30fc\u30c9\u5185\u3067\u30d8\u30eb\u30b9\u30c1\u30a7\u30c3\u30af\u306e\u72b6\u6cc1\u306b\u5fdc\u3058\u3066\u8907\u6570\u306e\u30b5\u30fc\u30d0\u30fc\u3092\u540d\u524d\u89e3\u6c7a\u5148\u3068\u3057\u3066\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p><b>\u4f8b\uff1a<\/b><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">web01\uff08Weight: 50\uff09<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">web02\uff08Weight: 50\uff09<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Sorry\uff08Weight: 0\uff09<\/span><\/li>\n<\/ul>\n\n\n\n<p><span style=\"font-weight: 400;\">\u901a\u5e38\u306fweb01\u30fbweb02\u3078\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u304c\u632f\u308a\u5206\u3051\u3089\u308c\u307e\u3059\u304c\u3001\u4e21\u65b9\u304c\u30c0\u30a6\u30f3\u3057\u305f\u5834\u5408\u306fSorry\u30da\u30fc\u30b8\u3078\u6d41\u308c\u308b\u4ed5\u7d44\u307f\u3067\u3059\u3002<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><b>Sorry\u30da\u30fc\u30b8\u3078\u306e\u9077\u79fb\u6642\u306e\u6319\u52d5\u3068SEO\u306e\u8003\u616e\u70b9<\/b><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">Sorry\u30da\u30fc\u30b8\u3078\u306e\u30d5\u30a7\u30fc\u30eb\u30aa\u30fc\u30d0\u30fc\u306f\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u307e\u3059\u304c\u30011\u3064\u61f8\u5ff5\u70b9\u304c\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">Sorry\u30da\u30fc\u30b8\u304cHTTP 200 OK\u3067\u5fdc\u7b54\u3059\u308b\u305f\u3081\u3001\u4e00\u5ea6Sorry\u306b\u5207\u308a\u66ff\u308f\u308b\u3068\u30d6\u30e9\u30a6\u30b6\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u6b8b\u308a\u3001\u30da\u30fc\u30b8\u3092\u66f4\u65b0\u3057\u3066\u3082\u5143\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u8868\u793a\u3055\u308c\u306a\u3044\u3053\u3068\u304c\u3042\u308b\u3002<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">SEO\u3092\u8003\u616e\u3059\u308b\u3068\u3001Sorry\u30da\u30fc\u30b8\u306e\u30ec\u30b9\u30dd\u30f3\u30b9\u30b3\u30fc\u30c9\u306f**403\uff08Forbidden\uff09\u3084500\uff08Internal Server Error\uff09**\u3067\u8fd4\u3059\u306e\u304c\u9069\u5207\u3002<\/span><\/li>\n<\/ul>\n\n\n\n<p><span style=\"font-weight: 400;\">\u305d\u306e\u305f\u3081\u3001SEO\u3092\u610f\u8b58\u3059\u308b\u5834\u5408\u306f\u9069\u5207\u306a\u30a8\u30e9\u30fc\u30ec\u30b9\u30dd\u30f3\u30b9\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><b>Route53\u306eFailover\u3068Weight\u3092\u5229\u7528\u3057\u305f\u74b0\u5883\u69cb\u7bc9<\/b><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">\u3053\u3053\u3067\u306f\u3001Route53\u306eFailover\u304a\u3088\u3073Weight\u3092\u5229\u7528\u3057\u305f\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\u305f\u3081\u306eyaml\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p><b>\u6ce8\u610f\uff1a<\/b><span style=\"font-weight: 400;\"> \u3053\u308c\u3089\u306e\u8a2d\u5b9a\u306b\u306fVPC\u3001Subnet\u3001AMI\u306e\u30a4\u30e1\u30fc\u30b8ID\u3001Route53\u306eHostedZoneID\u306a\u3069\u304c\u542b\u307e\u308c\u3066\u304a\u308a\u3001\u9069\u7528\u74b0\u5883\u3092\u8003\u616e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FilaOver\u8a2d\u5b9a\u306e\u74b0\u5883\u3092\u4f5c\u308byaml<\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>Parameters: \n  KeyName:\n    Description: The EC2 Key Pair to allow SSH access to the instance\n    Type: &quot;AWS::EC2::KeyPair::KeyName&quot;\n\n  VPCID:\n    Type: String\n    Default: &quot;vpc-6a3b310e&quot;\n\n  SubnetID01:\n    Type: String\n    Default: &quot;subnet-989aecee&quot;\n\n  SubnetID02:\n    Type: String\n    Default: &quot;subnet-989aecee&quot;\n\n  SubnetID03:\n    Type: String\n    Default: &quot;subnet-989aecee&quot;\n\n  IMAGEID:\n    Type: String\n    Default: &quot;ami-0f7691f59fd7c47af&quot;\n\n### Route53 ###\n  HostedZoneId:\n    Type: String\n    Default: &quot;Z3P0P51LUVW4NB&quot;\n\n  HostedZoneName:\n    Type: String\n    Default: &quot;kapodev.work&quot;\n\n  HostedServerName:\n    Type: String\n    Default: &quot;hogeraccho&quot;\n\n  SetIdentifierBase:\n    Type: String\n    Default: &quot;hogeraccho&quot;\n\nResources:\n### 1 dai me ###\n  DEPLOYSG01:\n    Type: AWS::EC2::SecurityGroup\n    Properties:\n      GroupName: deploy-CFn01\n      GroupDescription: Allow SSH and HTTP access only MyIP\n      VpcId: !Ref VPCID\n      SecurityGroupIngress:\n        # http\n        - IpProtocol: tcp\n          FromPort: 80\n          ToPort: 80\n          CidrIp: &quot;0.0.0.0\/0&quot;\n        # ssh\n        - IpProtocol: tcp\n          FromPort: 22\n          ToPort: 22\n          CidrIp: &quot;0.0.0.0\/0&quot;\n\n  DEPLOYEC201: \n    Type: AWS::EC2::Instance\n    Properties: \n      ImageId: !Ref IMAGEID\n      KeyName: !Ref KeyName\n      InstanceType: t4g.micro\n      NetworkInterfaces: \n        - AssociatePublicIpAddress: &quot;true&quot;\n          DeviceIndex: &quot;0&quot;\n          SubnetId: !Ref SubnetID01\n          GroupSet:\n            - !Ref DEPLOYSG01\n      UserData: !Base64 |\n        #!\/bin\/bash\n        sudo yum update -y\n        sudo amazon-linux-extras\n        sudo amazon-linux-extras install nginx1 -y\n        sudo systemctl enable nginx\n        sudo systemctl start nginx\n        sudo echo &quot;deploy-CFn01&quot; &gt;\/usr\/share\/nginx\/html\/index.html\n      Tags:\n          - Key: Name\n            Value: deploy-CFn01\n\n  HealthCheck01: \n    Type: &#39;AWS::Route53::HealthCheck&#39;\n    Properties: \n      HealthCheckConfig: \n        IPAddress: !GetAtt DEPLOYEC201.PublicIp\n        Port: 80\n        Type: HTTP\n        ResourcePath: &#39;\/&#39;\n        FullyQualifiedDomainName: !GetAtt DEPLOYEC201.PublicDnsName\n        RequestInterval: 30\n        FailureThreshold: 2\n      HealthCheckTags: \n        - \n          Key: Name\n          Value: deploy-CFn01\n\n  RecordSet01: \n    Type: AWS::Route53::RecordSet\n    Properties: \n      Failover: PRIMARY # PRIMARY \/ SECONDARY\n      HealthCheckId: !GetAtt HealthCheck01.HealthCheckId\n      HostedZoneId: !Ref HostedZoneId\n      Name: !Sub ${HostedServerName}.${HostedZoneName}\n      ResourceRecords: \n        - !GetAtt DEPLOYEC201.PublicIp\n      SetIdentifier: !Sub ${SetIdentifierBase}01\n      TTL: &quot;60&quot;\n      Type: &quot;A&quot; # Valid values for basic resource record sets: A | AAAA | CAA | CNAME | DS |MX | NAPTR | NS | PTR | SOA | SPF | SRV | TXT\n\n\n### 2 dai me ###\n  DEPLOYSG02:\n    Type: AWS::EC2::SecurityGroup\n    Properties:\n      GroupName: deploy-CFn02\n      GroupDescription: Allow SSH and HTTP access only MyIP\n      VpcId: !Ref VPCID\n      SecurityGroupIngress:\n        # http\n        - IpProtocol: tcp\n          FromPort: 80\n          ToPort: 80\n          CidrIp: &quot;0.0.0.0\/0&quot;\n        # ssh\n        - IpProtocol: tcp\n          FromPort: 22\n          ToPort: 22\n          CidrIp: &quot;0.0.0.0\/0&quot;\n\n  DEPLOYEC202: \n    Type: AWS::EC2::Instance\n    Properties: \n      ImageId: !Ref IMAGEID\n      KeyName: !Ref KeyName\n      InstanceType: t4g.micro\n      NetworkInterfaces: \n        - AssociatePublicIpAddress: &quot;true&quot;\n          DeviceIndex: &quot;0&quot;\n          SubnetId: !Ref SubnetID02\n          GroupSet:\n            - !Ref DEPLOYSG02\n      UserData: !Base64 |\n        #!\/bin\/bash\n        sudo yum update -y\n        sudo amazon-linux-extras\n        sudo amazon-linux-extras install nginx1 -y\n        sudo systemctl enable nginx\n        sudo systemctl start nginx\n        sudo echo &quot;deploy-CFn02&quot; &gt;\/usr\/share\/nginx\/html\/index.html\n      Tags:\n          - Key: Name\n            Value: deploy-CFn02\n\n  HealthCheck02: \n    Type: &#39;AWS::Route53::HealthCheck&#39;\n    Properties: \n      HealthCheckConfig: \n        IPAddress: !GetAtt DEPLOYEC202.PublicIp\n        Port: 80\n        Type: HTTP\n        ResourcePath: &#39;\/&#39;\n        FullyQualifiedDomainName: !GetAtt DEPLOYEC202.PublicDnsName\n        RequestInterval: 30\n        FailureThreshold: 2\n      HealthCheckTags: \n        - \n          Key: Name\n          Value: deploy-CFn02\n\n### for Sorry ###\n  DEPLOYSG03:\n    Type: AWS::EC2::SecurityGroup\n    Properties:\n      GroupName: deploy-CFn03\n      GroupDescription: Allow SSH and HTTP access only MyIP\n      VpcId: !Ref VPCID\n      SecurityGroupIngress:\n        # http\n        - IpProtocol: tcp\n          FromPort: 80\n          ToPort: 80\n          CidrIp: &quot;0.0.0.0\/0&quot;\n        # ssh\n        - IpProtocol: tcp\n          FromPort: 22\n          ToPort: 22\n          CidrIp: &quot;0.0.0.0\/0&quot;\n\n  DEPLOYEC203: \n    Type: AWS::EC2::Instance\n    Properties: \n      ImageId: !Ref IMAGEID\n      KeyName: !Ref KeyName\n      InstanceType: t4g.micro\n      NetworkInterfaces: \n        - AssociatePublicIpAddress: &quot;true&quot;\n          DeviceIndex: &quot;0&quot;\n          SubnetId: !Ref SubnetID03\n          GroupSet:\n            - !Ref DEPLOYSG03\n      UserData: !Base64 |\n        #!\/bin\/bash\n        sudo yum update -y\n        sudo amazon-linux-extras\n        sudo amazon-linux-extras install nginx1 -y\n        sudo systemctl enable nginx\n        sudo systemctl start nginx\n        sudo echo &quot;deploy-CFn03&quot; &gt;\/usr\/share\/nginx\/html\/index.html\n      Tags:\n          - Key: Name\n            Value: deploy-CFn03\n\n  HealthCheck03: \n    Type: &#39;AWS::Route53::HealthCheck&#39;\n    Properties: \n      HealthCheckConfig: \n        IPAddress: !GetAtt DEPLOYEC203.PublicIp\n        Port: 80\n        Type: HTTP\n        ResourcePath: &#39;\/&#39;\n        FullyQualifiedDomainName: !GetAtt DEPLOYEC203.PublicDnsName\n        RequestInterval: 30\n        FailureThreshold: 2\n      HealthCheckTags: \n        - \n          Key: Name\n          Value: deploy-CFn03\n\n  RecordSet03: \n    Type: AWS::Route53::RecordSet\n    Properties: \n      Failover: SECONDARY # PRIMARY \/ SECONDARY\n      HealthCheckId: !GetAtt HealthCheck03.HealthCheckId\n      HostedZoneId: !Ref HostedZoneId\n      Name: !Sub ${HostedServerName}.${HostedZoneName}\n      ResourceRecords: \n        - !GetAtt DEPLOYEC203.PublicIp\n      SetIdentifier: !Sub ${SetIdentifierBase}03\n      TTL: &quot;60&quot;\n      Type: &quot;A&quot;<\/code><\/pre><\/div>\n\n\n\n\n\n\n\n<h2 class=\"wp-block-heading\"><span>Weight\u8a2d\u5b9a\u306e\u74b0\u5883\u3092\u4f5c\u308byaml<\/span><\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>Parameters: \n  KeyName:\n    Description: The EC2 Key Pair to allow SSH access to the instance\n    Type: &quot;AWS::EC2::KeyPair::KeyName&quot;\n\n  VPCID:\n    Type: String\n    Default: &quot;vpc-6a3b310e&quot;\n\n  SubnetID01:\n    Type: String\n    Default: &quot;subnet-989aecee&quot;\n\n  SubnetID02:\n    Type: String\n    Default: &quot;subnet-989aecee&quot;\n\n  SubnetID03:\n    Type: String\n    Default: &quot;subnet-989aecee&quot;\n\n  IMAGEID:\n    Type: String\n    Default: &quot;ami-0f7691f59fd7c47af&quot;\n\n### Route53 ###\n  HostedZoneId:\n    Type: String\n    Default: &quot;Z3P0P51LUVW4NB&quot;\n\n  HostedZoneName:\n    Type: String\n    Default: &quot;kapodev.work&quot;\n\n  HostedServerName:\n    Type: String\n    Default: &quot;hogeraccho&quot;\n\n  SetIdentifierBase:\n    Type: String\n    Default: &quot;hogeraccho&quot;\n\nResources:\n### 1 dai me ###\n  DEPLOYSG01:\n    Type: AWS::EC2::SecurityGroup\n    Properties:\n      GroupName: deploy-CFn01\n      GroupDescription: Allow SSH and HTTP access only MyIP\n      VpcId: !Ref VPCID\n      SecurityGroupIngress:\n        # http\n        - IpProtocol: tcp\n          FromPort: 80\n          ToPort: 80\n          CidrIp: &quot;0.0.0.0\/0&quot;\n        # ssh\n        - IpProtocol: tcp\n          FromPort: 22\n          ToPort: 22\n          CidrIp: &quot;0.0.0.0\/0&quot;\n\n  DEPLOYEC201: \n    Type: AWS::EC2::Instance\n    Properties: \n      ImageId: !Ref IMAGEID\n      KeyName: !Ref KeyName\n      InstanceType: t4g.micro\n      NetworkInterfaces: \n        - AssociatePublicIpAddress: &quot;true&quot;\n          DeviceIndex: &quot;0&quot;\n          SubnetId: !Ref SubnetID01\n          GroupSet:\n            - !Ref DEPLOYSG01\n      UserData: !Base64 |\n        #!\/bin\/bash\n        sudo yum update -y\n        sudo amazon-linux-extras\n        sudo amazon-linux-extras install nginx1 -y\n        sudo systemctl enable nginx\n        sudo systemctl start nginx\n        sudo echo &quot;deploy-CFn01&quot; &gt;\/usr\/share\/nginx\/html\/index.html\n      Tags:\n          - Key: Name\n            Value: deploy-CFn01\n\n  HealthCheck01: \n    Type: &#39;AWS::Route53::HealthCheck&#39;\n    Properties: \n      HealthCheckConfig: \n        IPAddress: !GetAtt DEPLOYEC201.PublicIp\n        Port: 80\n        Type: HTTP\n        ResourcePath: &#39;\/&#39;\n        FullyQualifiedDomainName: !GetAtt DEPLOYEC201.PublicDnsName\n        RequestInterval: 30\n        FailureThreshold: 2\n      HealthCheckTags: \n        - \n          Key: Name\n          Value: deploy-CFn01\n\n  RecordSet01: \n    Type: AWS::Route53::RecordSet\n    Properties: \n      HealthCheckId: !GetAtt HealthCheck01.HealthCheckId\n      HostedZoneId: !Ref HostedZoneId\n      Name: !Sub ${HostedServerName}.${HostedZoneName}\n      ResourceRecords: \n        - !GetAtt DEPLOYEC201.PublicIp\n      SetIdentifier: !Sub ${SetIdentifierBase}01\n      TTL: &quot;60&quot;\n      Type: &quot;A&quot; # Valid values for basic resource record sets: A | AAAA | CAA | CNAME | DS |MX | NAPTR | NS | PTR | SOA | SPF | SRV | TXT\n      Weight: 50\n\n### 2 dai me ###\n  DEPLOYSG02:\n    Type: AWS::EC2::SecurityGroup\n    Properties:\n      GroupName: deploy-CFn02\n      GroupDescription: Allow SSH and HTTP access only MyIP\n      VpcId: !Ref VPCID\n      SecurityGroupIngress:\n        # http\n        - IpProtocol: tcp\n          FromPort: 80\n          ToPort: 80\n          CidrIp: &quot;0.0.0.0\/0&quot;\n        # ssh\n        - IpProtocol: tcp\n          FromPort: 22\n          ToPort: 22\n          CidrIp: &quot;0.0.0.0\/0&quot;\n\n  DEPLOYEC202: \n    Type: AWS::EC2::Instance\n    Properties: \n      ImageId: !Ref IMAGEID\n      KeyName: !Ref KeyName\n      InstanceType: t4g.micro\n      NetworkInterfaces: \n        - AssociatePublicIpAddress: &quot;true&quot;\n          DeviceIndex: &quot;0&quot;\n          SubnetId: !Ref SubnetID02\n          GroupSet:\n            - !Ref DEPLOYSG02\n      UserData: !Base64 |\n        #!\/bin\/bash\n        sudo yum update -y\n        sudo amazon-linux-extras\n        sudo amazon-linux-extras install nginx1 -y\n        sudo systemctl enable nginx\n        sudo systemctl start nginx\n        sudo echo &quot;deploy-CFn02&quot; &gt;\/usr\/share\/nginx\/html\/index.html\n      Tags:\n          - Key: Name\n            Value: deploy-CFn02\n\n  HealthCheck02: \n    Type: &#39;AWS::Route53::HealthCheck&#39;\n    Properties: \n      HealthCheckConfig: \n        IPAddress: !GetAtt DEPLOYEC202.PublicIp\n        Port: 80\n        Type: HTTP\n        ResourcePath: &#39;\/&#39;\n        FullyQualifiedDomainName: !GetAtt DEPLOYEC202.PublicDnsName\n        RequestInterval: 30\n        FailureThreshold: 2\n      HealthCheckTags: \n        - \n          Key: Name\n          Value: deploy-CFn02\n\n  RecordSet02: \n    Type: AWS::Route53::RecordSet\n    Properties: \n      HealthCheckId: !GetAtt HealthCheck02.HealthCheckId\n      HostedZoneId: !Ref HostedZoneId\n      Name: !Sub ${HostedServerName}.${HostedZoneName}\n      ResourceRecords: \n        - !GetAtt DEPLOYEC202.PublicIp\n      SetIdentifier: !Sub ${SetIdentifierBase}02\n      TTL: &quot;60&quot;\n      Type: &quot;A&quot;\n      Weight: 50\n\n### for Sorry ###\n  DEPLOYSG03:\n    Type: AWS::EC2::SecurityGroup\n    Properties:\n      GroupName: deploy-CFn03\n      GroupDescription: Allow SSH and HTTP access only MyIP\n      VpcId: !Ref VPCID\n      SecurityGroupIngress:\n        # http\n        - IpProtocol: tcp\n          FromPort: 80\n          ToPort: 80\n          CidrIp: &quot;0.0.0.0\/0&quot;\n        # ssh\n        - IpProtocol: tcp\n          FromPort: 22\n          ToPort: 22\n          CidrIp: &quot;0.0.0.0\/0&quot;\n\n  DEPLOYEC203: \n    Type: AWS::EC2::Instance\n    Properties: \n      ImageId: !Ref IMAGEID\n      KeyName: !Ref KeyName\n      InstanceType: t4g.micro\n      NetworkInterfaces: \n        - AssociatePublicIpAddress: &quot;true&quot;\n          DeviceIndex: &quot;0&quot;\n          SubnetId: !Ref SubnetID03\n          GroupSet:\n            - !Ref DEPLOYSG03\n      UserData: !Base64 |\n        #!\/bin\/bash\n        sudo yum update -y\n        sudo amazon-linux-extras\n        sudo amazon-linux-extras install nginx1 -y\n        sudo systemctl enable nginx\n        sudo systemctl start nginx\n        sudo echo &quot;deploy-CFn03&quot; &gt;\/usr\/share\/nginx\/html\/index.html\n      Tags:\n          - Key: Name\n            Value: deploy-CFn03\n\n  HealthCheck03: \n    Type: &#39;AWS::Route53::HealthCheck&#39;\n    Properties: \n      HealthCheckConfig: \n        IPAddress: !GetAtt DEPLOYEC203.PublicIp\n        Port: 80\n        Type: HTTP\n        ResourcePath: &#39;\/&#39;\n        FullyQualifiedDomainName: !GetAtt DEPLOYEC203.PublicDnsName\n        RequestInterval: 30\n        FailureThreshold: 2\n      HealthCheckTags: \n        - \n          Key: Name\n          Value: deploy-CFn03\n\n  RecordSet03: \n    Type: AWS::Route53::RecordSet\n    Properties: \n      HealthCheckId: !GetAtt HealthCheck03.HealthCheckId\n      HostedZoneId: !Ref HostedZoneId\n      Name: !Sub ${HostedServerName}.${HostedZoneName}\n      ResourceRecords: \n        - !GetAtt DEPLOYEC203.PublicIp\n      SetIdentifier: !Sub ${SetIdentifierBase}03\n      TTL: &quot;60&quot;\n      Type: &quot;A&quot;\n      Weight: 0<\/code><\/pre><\/div>\n\n\n\n\n\n\n\n<h2 class=\"wp-block-heading\"><span>\u307e\u3068\u3081<\/span><\/h2>\n\n\n\n<p><span>\u4eca\u56de\u306e\u691c\u8a3c\u3067\u306f\u3001AWS\u306eRoute53\u3092\u6d3b\u7528\u3057\u3066Sorry\u30da\u30fc\u30b8\u306e\u30d5\u30a7\u30fc\u30eb\u30aa\u30fc\u30d0\u30fc\u3092\u5b9f\u73fe\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span>CloudFront\u3084ALB\u306e\u30ab\u30b9\u30bf\u30e0\u30a8\u30e9\u30fc\u30da\u30fc\u30b8\u306e\u4ee3\u66ff\u624b\u6bb5\u3068\u3057\u3066\u3001Route53\u306eFailover\u3084Weight\u3092\u6d3b\u7528\u3067\u304d\u308b\u3002<\/span><\/li>\n\n\n\n<li><span>Sorry\u30da\u30fc\u30b8\u306e\u30ec\u30b9\u30dd\u30f3\u30b9\u30b3\u30fc\u30c9\u306f\u9069\u5207\u306b\u8a2d\u5b9a\u3057\u306a\u3044\u3068\u3001SEO\u3084\u30e6\u30fc\u30b6\u30fc\u4f53\u9a13\u306b\u5f71\u97ff\u3092\u4e0e\u3048\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3002<\/span><\/li>\n\n\n\n<li><span>CloudFormation\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001Failover\/Weight\u306e\u8a2d\u5b9a\u3092\u7c21\u5358\u306b\u30c7\u30d7\u30ed\u30a4\u53ef\u80fd\u3002<\/span><\/li>\n<\/ul>\n\n\n\n<p><span>Sorry\u30da\u30fc\u30b8\u306e\u8a2d\u8a08\u306f\u3001\u30b5\u30a4\u30c8\u306e\u53ef\u7528\u6027\u3068UX\u3092\u8003\u616e\u3057\u306a\u304c\u3089\u3001\u9069\u5207\u306a\u624b\u6cd5\u3092\u9078\u629e\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002<\/span><\/p>\n\n\n\n<p><span>\u4eca\u5f8c\u3001\u3088\u308a\u67d4\u8edf\u306aSorry\u30da\u30fc\u30b8\u306e\u5b9f\u88c5\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3082\u691c\u8a0e\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3001TAM\u306e\u77f3\u5ddd\u3067\u3059\u3002 Web\u30b5\u30a4\u30c8\u304c\u969c\u5bb3\u3084\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u3067\u505c\u6b62\u3057\u3066\u3044\u308b\u969b\u306b\u8868\u793a\u3059\u308bSorry\u30da\u30fc\u30b8\u3092AWS\u4e0a\u3067\u5207\u308a\u66ff\u3048\u308b\u65b9\u6cd5\u3068\u3057\u3066\u3001CloudFront\u306e\u30ab\u30b9\u30bf\u30e0\u30a8\u30e9\u30fc\u30da\u30fc\u30b8\u3092\u5229\u7528\u3059\u308b\u30b1\u30fc\u30b9\u304c\u591a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7666,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[63,21],"tags":[14,78,79,108],"class_list":["post-7663","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws","category-techblog","tag-aws","tag-route53","tag-sorry","tag-techblog"],"_links":{"self":[{"href":"https:\/\/ci.clara.jp\/media\/index.php?rest_route=\/wp\/v2\/posts\/7663","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ci.clara.jp\/media\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ci.clara.jp\/media\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ci.clara.jp\/media\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ci.clara.jp\/media\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7663"}],"version-history":[{"count":8,"href":"https:\/\/ci.clara.jp\/media\/index.php?rest_route=\/wp\/v2\/posts\/7663\/revisions"}],"predecessor-version":[{"id":11331,"href":"https:\/\/ci.clara.jp\/media\/index.php?rest_route=\/wp\/v2\/posts\/7663\/revisions\/11331"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ci.clara.jp\/media\/index.php?rest_route=\/wp\/v2\/media\/7666"}],"wp:attachment":[{"href":"https:\/\/ci.clara.jp\/media\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ci.clara.jp\/media\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ci.clara.jp\/media\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}