<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>swx-watanabe</author_name>
  <author_url>https://blog.hatena.ne.jp/swx-watanabe/</author_url>
  <blog_title>サーバーワークスエンジニアブログ</blog_title>
  <blog_url>https://blog.serverworks.co.jp/</blog_url>
  <categories>
    <anon>AWS</anon>
  </categories>
  <description>EC2インスタンス作成時に状況に応じて、異なるUserDataを実行したいことがあります。 例えば、CloudFormationのパラメータでインストールするPHPのバージョンを切り替えたいとします。 # デフォルトバージョンをインストール yum install -y php yum install -y httpd # バージョン7.2系をインストール amazon-linux-extras install -y php7.2 yum install -y httpd 方法１ 調べるとよく見る例です。 Resourceを2つ定義する Conditionにマッチした一方のResourceのみ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.serverworks.co.jp%2Ftech%2F2019%2F08%2F06%2Fcloudformation%2F&quot; title=&quot;CloudFormationでパラメータごとにEC2インスタンスのUserDataを切り替える - サーバーワークスエンジニアブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/s/swx-watanabe/20200808/20200808144134.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-08-06 08:03:35</published>
  <title>CloudFormationでパラメータごとにEC2インスタンスのUserDataを切り替える</title>
  <type>rich</type>
  <url>https://blog.serverworks.co.jp/tech/2019/08/06/cloudformation/</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
