AWS Direct Connect via BGP with Ubiquiti EdgeRouter

Goal: Establish connection between Ubiquiti EdgeRouter X with AWS Direct Connect via BGP

Environment:
VLAN: 100
Upstream ASN: 7000
Carriers IP: 10.0.105.1/30 “Neighbor”
Customer IP: 10.0.105.2/30
Customer ASN: 65105
Customer network to announce to the upstream: 10.0.10.0/24

Firstly setup the relevant access control list (acl), these will be governing what the connection’s ingress and egress can or cannot communicate.
Upstream means Amazon network in our context.

Allow all traffic from Upstream into Customer’s network

set policy prefix-list IMPORT-AS65105 rule 10 action permit
set policy prefix-list IMPORT-AS65105 rule 10 description ALLOW-DEFAULT-ROUTE
set policy prefix-list IMPORT-AS65105 rule 10 prefix 0.0.0.0/0
set policy prefix-list IMPORT-AS65105 rule 10 le 32
Commit

Allow network from customer into Upstream’s network

set policy prefix-list EXPORT-AS65105 rule 10 action permit
set policy prefix-list EXPORT-AS65105 rule 10 description “Announce 10.0.10.0/24”
set policy prefix-list EXPORT-AS65105 rule 10 prefix 10.0.10.0/24
commit

Setup the actual configuration using the previously created acl

set protocols bgp 65105 parameters router-id 10.0.105.1
set protocols bgp 65105 neighbor 10.0.105.2 remote-as 7000
set protocols bgp 65105 neighbor 10.0.105.2 password XXXXX
set protocols bgp 65105 neighbor 10.0.105.2 soft-reconfiguration inbound
set protocols bgp 65105 parameters log-neighbor-changes
set protocols bgp 65105 neighbor 10.0.105.2 prefix-list export EXPORT-AS65105
set protocols bgp 65105 neighbor 10.0.105.2 prefix-list import IMPORT-AS65105
set protocols bgp 65105 neighbor 10.0.105.2 update-source 10.0.105.1
set protocols bgp 65105 network 10.0.10.0/24
Commit

set protocols static route 10.0.10.0/24 blackhole
Commit