Finding out orphaned AWS Snapshots or Volumes

Sometimes there is no straightforward way to find out which AWS snapshot’s belongs to which instance, especially if it’s not managed properly for a long time. Often, and instance may have been deleted but the snapshots got forgotten. Especially the ones that are created manually.

Goal: Create an excel/csv list of AWS snapshots and linked it to it’s AWS instance and Volume of origin

 

I’ve taken the liberty of putting together a few PowerShell to make this happen, some of this are modification from other contributors

  • ListProdEC2.ps1
  • ListProdEC2Snapshots.ps1
  • ListProdEC2Volumes.ps1
  • ListProdEC2InstancesDetails.ps1

https://github.com/samuelthan/AWS-Powershell

 

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