Amazon Connect IPアドレス制限で設定したIPアドレスを削除する方法

Amazon Connect IPアドレス制限で設定したIPアドレスを削除する方法

Clock Icon2025.04.15

こんにちは。
繁松です。

はじめに

Amazon Connectで IPアドレス制限を設定した後に、設定を削除する方法を紹介します。

Amazon ConnectのIPアドレス制限は2025年4月5日時点ではプレビューリリースの機能となります。
本ブログで紹介している動作については今後のアップデートや利用する環境により変わる可能性があります。

IPアドレス制限の設定については以下のブログで紹介しています。
IPアドレス制限には事前に利用申請を行う必要があります。

https://dev.classmethod.jp/articles/amazon-connect-authentication-profiles/

やってみた

認証プロファイル設定内容の確認

認証プロファイルIDを確認します。

aws connect list-authentication-profiles --instance-id インスタンスID

認証プロファイル設定内容を確認します。

aws connect describe-authentication-profile --instance-id インスタンスID --authentication-profile-id 認証プロファイルID

実行結果例
今回は「AllowedIps」と「BlockedIps」に設定されたIPアドレス制限を削除してみます。

{
    "AuthenticationProfile": {
        "Id": "認証プロファイルID",
        "Arn": "arn:aws:connect:ap-northeast-1:AWSアカウント番号:instance/インスタンスID/authentication-profile/認証プロファイルID",
        "Name": "Default Authentication Profile",
        "Description": "A basic default Authentication Profile",
        "AllowedIps": [
            "10.0.0.0/32"
        ],
        "BlockedIps": [
            "10.0.0.1/32"
        ],
        "IsDefault": true,
        "CreatedTime": "2025-03-19T15:53:04.162000+09:00",
        "LastModifiedTime": "2025-04-15T23:30:43.433000+09:00",
        "LastModifiedRegion": "ap-northeast-1",
        "PeriodicSessionDuration": 60,
        "MaxSessionDuration": 720
    }
}

IPアドレス制限の削除方法

削除したい場合はCLIコマンド内でIPアドレスを指定しているパラメータを「"[]"」にすると削除可能です。

IPアドレス制限(許可)の削除

aws connect update-authentication-profile --instance-id インスタンスID --authentication-profile-id 認証プロファイルID --allowed-ips "[]"

IPアドレス制限(拒否)の削除

aws connect update-authentication-profile --instance-id インスタンスID --authentication-profile-id 認証プロファイルID --blocked-ips "[]"

確認

上記コマンドを実行した後に、認証プロファイル設定内容を確認するとIPアドレス制限の設定が消えたことを確認できました。

aws connect describe-authentication-profile --instance-id インスタンスID --authentication-profile-id 認証プロファイルID

実行結果例
「AllowedIps」と「BlockedIps」に設定されたIPアドレス制限が削除されました。

{
    "AuthenticationProfile": {
        "Id": "認証プロファイルID",
        "Arn": "arn:aws:connect:ap-northeast-1:AWSアカウント番号:instance/インスタンスID/authentication-profile/認証プロファイルID",
        "Name": "Default Authentication Profile",
        "Description": "A basic default Authentication Profile",
        "AllowedIps": [],
        "BlockedIps": [],
        "IsDefault": true,
        "CreatedTime": "2025-03-19T15:53:04.162000+09:00",
        "LastModifiedTime": "2025-04-15T23:30:43.433000+09:00",
        "LastModifiedRegion": "ap-northeast-1",
        "PeriodicSessionDuration": 60,
        "MaxSessionDuration": 720
    }
}

さいごに

設定を削除しようとした際に、オプションの指定方法がドキュメントで見つけれなかったので色々と試して削除方法を見つけることができました。
以上、IPアドレス制限の削除方法についてのブログでした。

Share this article

facebook logohatena logotwitter logo

© Classmethod, Inc. All rights reserved.