@Override
    public boolean send(final String from, final String to, final String message) {
        try {
            val smsAttributes = new HashMap<String, MessageAttributeValue>();
            if (StringUtils.isNotBlank(snsProperties.getSenderId())) {
                smsAttributes.put("AWS.SNS.SMS.SenderID", MessageAttributeValue.builder().stringValue(snsProperties.getSenderId()).dataType("String").build());
            }
            if (StringUtils.isNotBlank(snsProperties.getMaxPrice())) {
                smsAttributes.put("AWS.SNS.SMS.MaxPrice", MessageAttributeValue.builder().stringValue(snsProperties.getMaxPrice()).dataType("Number").build());
            }
            if (StringUtils.isNotBlank(snsProperties.getSmsType())) {
                smsAttributes.put("AWS.SNS.SMS.SMSType", MessageAttributeValue.builder().stringValue(snsProperties.getSmsType()).dataType("String").build());
            }
            val result = snsClient.publish(PublishRequest.builder()
                .message(message)
                .phoneNumber(to)
                .messageAttributes(smsAttributes)
                .build());
            LOGGER.debug("Submitted SMS publish request with resulting message id [{}]", result.messageId());
            return StringUtils.isNotBlank(result.messageId());
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
        }
        return false;
    }
This is {@link AmazonSimpleNotificationServiceSmsSender}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-sms-aws-sns/src/main/java/org/apereo/cas/support/sms/AmazonSimpleNotificationServiceSmsSender.java