Monthly Archives: March 2016

Template contains errors.: Template format error: Any Properties member must be a JSON object.

  CloudFormationのデバッグのしづらさは、きっとAWSの陰謀に違いない。 わからん。わからんすぎる。   なにがあった   セキュリティグループでね、当該グループ自身をセキュリティ許可のSourceにする、 ちょい特殊な定義をCloudFormationでしたかったんですよ。 無論、”AWS::EC2::SecurityGroup”の定義の中で自分自身を参照すると循環参照になっちゃうんで、 こうしたわけです。 [text highlight=”1,16,20,29,33″] “ElbSg” : { “Type” : “AWS::EC2::SecurityGroup”, “Properties” : { “GroupDescription” : “HTTP and HTTPS Allow”, “VpcId” : { “Ref” : “VpcId” }, } }, “ElbSgIngress” : { “Type” : “AWS::EC2::SecurityGroupIngress”, “Properties” : [ { “IpProtocol” : “tcp”, “FromPort” : “80”, “ToPort” : “80”, “GroupId” : { “Fn::GetAtt”: [ “ElbSg”, “GroupId” ] }, “SourceSecurityGroupId” : { “Fn::GetAtt”: [ “ElbSg”, “GroupId” ] } }, { “IpProtocol” : “tcp”, “FromPort” : “443”, “ToPort” : “443”, “GroupId” : { “Fn::GetAtt”: [ “ElbSg”, “GroupId” ] }, “SourceSecurityGroupId” : { “Fn::GetAtt”: [ “ElbSg”, “GroupId” ] } } ] } [/text]   そしたらCloudFormationのスタック作成時にこうエラーが出るわけですな。 Template contains […]

Kindleで本を買う時のiPhoneやiPadの名前を変更したい

    iPhoneやiPadにKindleアプリをインストールすると、 「hogehoge さん のiPhone」 的な表示になっています。 これが非常にかっこ悪くてイヤである。 変更したい。   画面メニュー右上の「コンテンツと端末の管理」をクリック。 「端末」をクリックし、名前を変更したいデバイスを選択。 「山田太郎 さんの iPhone6」の右に「編集」リンクが出るので、名前を編集する。   ふふふ・・すっきりした!   幸せになる勇気 posted with amazlet at 16.03.18 ダイヤモンド社 (2016-02-26)売り上げランキング: 4 Amazon.co.jpで詳細を見る

AWS CloudFormationのNACL定義で、TypeやPort RangeをALLにする書き方

  今週はCloudFormationと戯れる毎日でございました。 普段、Network ACLはデフォルト値とし、セキュリティグループでアクセス制御をするのが 個人的な好みなのですが、顧客要件とあらば仕方ありませぬ。   特定のCIDRへのアクセスを全許可したり、TCPだけ全許可したり、 といった場合の記述をした際、一瞬「ん?」となりましたので、 忘れないようにメモを残しておこうと思いました。   TCPを全許可 特定のIPアドレスレンジへのALL TCPを全許可するには、 Port Rangeで全ポートを指定。 [text highlight=”10″] “InboundAllTcpNaclEntry” : { “Type” : “AWS::EC2::NetworkAclEntry”, “Properties” : { “NetworkAclId” : { “Ref” : “AllPermitNacl” }, “RuleNumber” : “95”, “Protocol” : “6”, “RuleAction” : “allow”, “Egress” : “false”, “CidrBlock” : “XXX.XXX.XXX.0/XX”, “PortRange” : { “From” : “0”, “To” : “65535” } } }, [/text]   全ポートの通信を明示的に許可 特定のIPアドレスレンジに対して、明示的に、とにかく全部通したい場合。 [text highlight=”6,10″] “InboundAllNaclEntry” : { “Type” : “AWS::EC2::NetworkAclEntry”, “Properties” : { “NetworkAclId” : { “Ref” : “AllPermitNacl” }, “RuleNumber” : “990”, “Protocol” : “-1”, “RuleAction” : “allow”, “Egress” : “false”, “CidrBlock” : “XXX.XXX.XXX.0/XX”, “PortRange” : { “From” : “-1”, “To” : “-1” } } }, [/text] […]