<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Makky12</author_name>
  <author_url>https://blog.hatena.ne.jp/Makky12/</author_url>
  <blog_title>echo(&quot;備忘録&quot;);</blog_title>
  <blog_url>https://makky12.hatenablog.com/</blog_url>
  <categories>
    <anon>AWS</anon>
    <anon>AWS CDK</anon>
    <anon>Lambda</anon>
  </categories>
  <description>今回のお題 タイトル通り、AWS CDKでLambda定義を書く際にちょっとした工夫でCloudFormationリソース数を削減する方法を紹介します。 普段はそこまで神経質になる必要はありませんが、業務などで多数のリソースをAWS CDKで管理している場合に役に立つかもしれません。 なお今回触れるのは、Lambdaのロール＆ポリシー関連の書き方です。 TL;DR ロールは事前に定義したものをアタッチする ポリシーはinitialPolicyではなく、上記ロールにaddToPrincipalPolicyでアタッチする ロールやポリシーを重複して定義しない ただし、普段はそこまで神経質になる必要…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmakky12.hatenablog.com%2Fentry%2F2023%2F11%2F27%2F120500&quot; title=&quot;【AWS CDK】Lambda定義でCloudFormationリソース数を削減するTips - echo(&amp;quot;備忘録&amp;quot;);&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-11-27 12:05:00</published>
  <title>【AWS CDK】Lambda定義でCloudFormationリソース数を削減するTips</title>
  <type>rich</type>
  <url>https://makky12.hatenablog.com/entry/2023/11/27/120500</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
