0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CloudFormationのテンプレートで変数名をエスケープする方法

Posted at

CloudFormationのテンプレートで作成するポリシーの中に、ポリシー変数を埋め込みたい場合、このように書くとエラーとなります。

"Fn::Sub": "arn:aws:iam::${AWS::AccountId}:user/${aws:username}"

エラーを回避するために、'!'でエスケープさせることができます。

"Fn::Sub": "arn:aws:iam::${AWS::AccountId}:user/${!aws:username}"

公式ドキュメントにも記載はあるのですが、「エスケープ」という単語で引っかからないのでメモ。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?