HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/local/aws-cli/v2/dist/awscli/examples/route53resolver/create-resolver-rule.rst
**To create a Resolver rule**

The following ``create-resolver-rule`` example creates a Resolver forwarding rule. The rule uses the outbound endpoint rslvr-out-d5e5920e37example to forward DNS queries for ``example.com`` to the IP addresses 10.24.8.75 and 10.24.8.156. ::

    aws route53resolver create-resolver-rule \
        --creator-request-id 2020-01-02-18:47 \
        --domain-name example.com \
        --name my-rule \
        --resolver-endpoint-id rslvr-out-d5e5920e37example \
        --rule-type FORWARD \
        --target-ips="Ip=10.24.8.75" "Ip=10.24.8.156"

Output::

    {
        "ResolverRule": {
            "Status": "COMPLETE", 
            "RuleType": "FORWARD", 
            "ResolverEndpointId": "rslvr-out-d5e5920e37example", 
            "Name": "my-rule", 
            "DomainName": "example.com.", 
            "CreationTime": "2022-05-10T21:35:30.923187Z", 
            "TargetIps": [
                {
                    "Ip": "10.24.8.75", 
                    "Port": 53
                }, 
                {
                    "Ip": "10.24.8.156", 
                    "Port": 53
                }
            ], 
            "CreatorRequestId": "2022-05-10-16:33", 
            "ModificationTime": "2022-05-10T21:35:30.923187Z", 
            "ShareStatus": "NOT_SHARED", 
            "Arn": "arn:aws:route53resolver:us-east-1:111117012054:resolver-rule/rslvr-rr-b1e0b905e93611111", 
            "OwnerId": "111111111111", 
            "Id": "rslvr-rr-rslvr-rr-b1e0b905e93611111", 
            "StatusMessage": "[Trace id: 1-22222222-3e56afcc71a3724664f22e24] Successfully created Resolver Rule."
        }
    }