View a markdown version of this page

알림 시작하기 - AWS 최종 사용자 메시징 SMS

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

알림 시작하기

이 자습서에서는 알림 구성을 생성하고 첫 번째 OTP 메시지를 보내는 방법을 안내합니다. 약 5분 후에이 자습서를 완료할 수 있습니다.

사전 조건

다음 IAM 정책은 메시지를 보내고 템플릿을 찾아볼 수 있는 권한을 부여합니다.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "sms-voice:SendNotifyTextMessage", "sms-voice:SendNotifyVoiceMessage", "sms-voice:DescribeNotifyTemplates", "sms-voice:DescribeNotifyConfigurations", "sms-voice:ListNotifyCountries", "sms-voice:PutMessageFeedback" ], "Resource": "*" } ] }

다음 정책은 전체 알림 관리 권한을 부여합니다.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "sms-voice:CreateNotifyConfiguration", "sms-voice:UpdateNotifyConfiguration", "sms-voice:DeleteNotifyConfiguration", "sms-voice:DescribeNotifyConfigurations", "sms-voice:DescribeNotifyTemplates", "sms-voice:ListNotifyCountries", "sms-voice:SendNotifyTextMessage", "sms-voice:SendNotifyVoiceMessage", "sms-voice:SetNotifyMessageSpendLimitOverride", "sms-voice:DeleteNotifyMessageSpendLimitOverride", "sms-voice:PutMessageFeedback" ], "Resource": "*" } ] }

특정 알림 구성에 대한 권한을 제한하려면 리소스 수준 작업(예: , SendNotifyTextMessage, SendNotifyVoiceMessage, DescribeNotifyConfigurations, UpdateNotifyConfiguration, CreateNotifyConfiguration)에 구성 ARN을 사용합니다DeleteNotifyConfiguration. 리소스 수준 권한을 지원하지 않는 작업(예: DescribeNotifyTemplates, ListNotifyCountries, DeleteNotifyMessageSpendLimitOverride, SetNotifyMessageSpendLimitOverridePutMessageFeedback)에는가 필요합니다"Resource": "*".

1단계: 알림 구성 생성

Console
  1. https://console.aws.amazon.com/sms-voice/ AWS End User Messaging SMS 콘솔을 엽니다.

  2. 탐색 창의 알림에서 구성 알림을 선택합니다.

  3. 알림 구성 생성을 선택합니다.

  4. 표시 이름에 브랜드 이름(예: AcmeCorp)을 입력합니다.

  5. 사용 사례의 경우 코드 확인이 자동으로 선택됩니다.

  6. 채널에서 SMS, 음성 또는 둘 다를 선택합니다.

  7. (선택 사항) 고급 설정을 확장하여 국가, 기본 템플릿, 연결된 풀을 선택하거나 삭제 방지를 활성화합니다.

  8. 알림 구성 생성을 선택합니다.

시스템에서 계정을 검증하는 동안 구성이 보류 중 상태로 생성됩니다. 확인되면 상태가 활성으로 변경되고 메시지 전송을 시작할 수 있습니다.

참고

구성 생성에는 자동 계정 검증 및 브랜드 이름 확인이 포함됩니다. 대부분의 구성은 몇 초 내에 활성화됩니다. 브랜드 이름에 확인이 필요한 경우 상태는 확인 필요입니다.

AWS CLI
aws pinpoint-sms-voice-v2 create-notify-configuration \ --display-name "AcmeCorp" \ --use-case CODE_VERIFICATION \ --enabled-channels SMS

구성 상태:

PENDING

구성이 검증되고 있습니다.

ACTIVE

메시지를 보낼 준비가 되었습니다.

REQUIRES_VERIFICATION

브랜드 이름을 활성화하기 전에 확인해야 합니다.

REJECTED

구성이 거부되었습니다. RejectionReason 세부 정보를 확인합니다.

2단계: 사용 가능한 템플릿 찾아보기

전송하기 전에 티어 및 채널에 사용할 수 있는 템플릿을 확인합니다.

aws pinpoint-sms-voice-v2 describe-notify-templates \ --filters '[{"Name":"channels","Values":["SMS"]},{"Name":"tier-access","Values":["BASIC"]}]'

3단계: 테스트 메시지 전송

Console
  1. 구성 알림 목록에서 구성을 선택합니다.

  2. 테스트 탭을 선택합니다.

  3. 템플릿 테이블에서 템플릿을 선택합니다.

  4. 대상 전화번호에 전화번호를 E.164 형식(예: +12065550100)으로 입력합니다.

  5. 템플릿 변수를 입력합니다(예: 코드 변수123456에를 입력).

  6. 전송를 선택합니다.

AWS CLI
aws pinpoint-sms-voice-v2 send-notify-text-message \ --notify-configuration-id "nc-1234567890abcdef0" \ --destination-phone-number "+12065550100" \ --template-id "notify-code-verification-english-001" \ --template-variables '{"code":"123456"}'
Python (boto3)
import boto3 client = boto3.client('pinpoint-sms-voice-v2') response = client.send_notify_text_message( NotifyConfigurationId='nc-1234567890abcdef0', DestinationPhoneNumber='+12065550100', TemplateId='notify-code-verification-english-001', TemplateVariables={ 'code': '123456' } ) print(f"Message ID: {response['MessageId']}") print(f"Resolved body: {response['ResolvedMessageBody']}")

4단계: 사용 가능한 국가 확인

ListNotifyCountries를 사용하여 티어 및 채널에 사용할 수 있는 국가를 확인합니다.

aws pinpoint-sms-voice-v2 list-notify-countries \ --channels SMS \ --tier BASIC

다음 단계