0
0

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.

[JAWS-UG CLI] SES:#5 Incoming用ルールセットの無効化

Posted at

前提条件

SESへの権限

SESに対してフル権限があること。

AWS CLI

以下のバージョンで動作確認済

  • AWS CLI 1.10.63
コマンド
aws --version
結果(例)
      aws-cli/1.10.63 Python/2.7.11 Darwin/15.6.0 botocore/1.4.53

バージョンが古い場合は最新版に更新しましょう。

コマンド
sudo -H pip install -U awscli
  1. 準備
    =======

0.1. リージョンの決定

変数の設定
export AWS_DEFAULT_REGION='us-west-2'

0.2. 変数の確認

プロファイルが想定のものになっていることを確認します。

変数の確認
aws configure list
結果(例)
            Name                    Value             Type    Location
            ----                    -----             ----    --------
         profile       sesFull-prjz-mbp13        env    AWS_DEFAULT_PROFILE
      access_key     ****************XXXX shared-credentials-file
      secret_key     ****************XXXX shared-credentials-file
          region        us-west-2        env    AWS_DEFAULT_REGION

0.3. ルールセット名の指定

変数の設定
SES_RULE_SET_NAME='default-rule-set'
  1. 事前作業
    ===========
コマンド
aws ses describe-active-receipt-rule-set 
結果(例)
      {
        "Rules": [
          {
              "Name": "rule-inbound-spam-filter-20160912",
              "Recipients": [
                  "spa@example.jp"
              ],
              "Enabled": true,
              "ScanEnabled": true,
              "Actions": [
                  {
                      "LambdaAction": {
                          "InvocationType": "RequestResponse",
                          "FunctionArn": "arn:aws:lambda:us-west-2:XXXXXXXXXXXX:function:inbound-ses-spam-filter-python-20160912"
                      }
                  }
              ],
              "TlsPolicy": "Optional"
          }
        ],
        "Metadata": {
          "CreatedTimestamp": "2016-09-10T01:23:45.678",
          "Name": "default-rule-set"
        }
      }
  1. ルールセットの停止
    =====================
コマンド
aws ses set-active-receipt-rule-set 
結果(例)
      (戻り値なし)
  1. 事後確認
    ===========
コマンド
aws ses describe-active-receipt-rule-set 
結果(例)
      (戻り値なし)

完了

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?