あめがえるのITブログ

頑張りすぎない。ほどほどに頑張るブログ。

【AWS】CloudFormationでParametersにNoEchoを設定してみた


CloudFormationでParametersにNoEchoを設定してみた

ParametersのNoEchoとは

スタックのパラメータに機密情報を保存するときに、スタックのイベントログやパラメータの値が出力されるのを防ぐ。

実践!

1.サンプルテンプレート作成

AWSTemplateFormatVersion: "2010-09-09"
Description: "Example template with NoEcho for a simple S3 bucket"

Parameters:
  BucketName:
    Description: "The name of the S3 bucket to create"
    Type: String
    NoEcho: true

Resources:
  MyBucket:
    Type: "AWS::S3::Bucket"
    Properties:
      BucketName: !Ref BucketName

Outputs:
  CreatedBucketName:
    Description: "The name of the created S3 bucket"
    Value: !Ref MyBucket


2.S3へアップ
任意のバケットにアップ

3.CloudFormationスタック作成
※こんな感じで値にマスクがかかる。



感想

最近キーボードの調子がおかしい、、、買い替えどきか。