1
2

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.

AWS WorkMailでユーザーを削除する方法

Last updated at Posted at 2019-05-26

はじめに

本稿は、「AWS WorkMail」を使用していて、かつ最低限運用できる方向けの記事となります。
AWS WorkMailに関しては以下の記事を参考にしてください。

概要

AWS WorkMailでは、コンソール上からユーザを削除することができない。
「Disable User」はあるものの、あくまで無効化するためのもので、永久に残り続けてしまう。

1.png

公式ドキュメントなどを調べた結果、「AWS CLI(コマンドラインインターフェース)」を利用して特定コマンドを実行することで削除できるようだったので、その手順について記載します。

手順

AWS CLIのインストールと設定

インストールは以下参照。
AWS CLI のインストールと設定

インストール後の設定は以下参照。
AWS CLI の設定

設定まで行うことで、初めてコマンドを実行することができるようになります。

AWS CLIでdelete-userコマンドの実行

まず、delete-userコマンドを実行するために、削除するユーザのIDが必要なため、「list-users」コマンドでユーザIDを取得する。

list-usersコマンドの詳細は以下参照。
list-users ー AWS CLI 1.16.166 Command Reference

$ aws workmail list-users --organization-id [コンソールの"Organization settings"で表示されている、Organization ID]
{
    "Users": [
        {
            "DisplayName": "xxxxxxxx", 
            "Name": "xxx", 
            "Email": "xxxxxxx@xxxxxx.xxxx", 
            "State": "ENABLED", 
            "EnabledDate": 1547190663.095, 
            "UserRole": "USER", 
            "Id": "00000-0000-000000-000000-0000000"
        }, 
        {
            "State": "DISABLED", 
            "Id": "000000-0000000-000000-00000-00000000", 
            "UserRole": "SYSTEM_USER", 
            "Name": "Administrator"
        }
    ]
}

そして、取得したユーザIDを指定して、delete-userコマンドを実行。

delete-userコマンドの詳細は以下参照。
delete-user ー AWS CLI 1.16.166 Command Reference

$ aws workmail delete-user --organization-id [コンソールの"Organization settings"で表示されている、Organization ID] --user-id 00000-0000-000000-000000-0000000

これでコンソール上からユーザが削除できるはずです。
(ただし、list-usersコマンドで見ると、ずっと残り続けるようです。。)

1
2
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
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?