I have an AWS DynamoDB table that stores IP ranges with a pool_address, a mask and an identifier (that is originally coming from excel/csv), eg.: pool_address is 100.150.200.0 mask is /22 identifier is myrange
I have about 250 of those.
Im trying to use Lambda to check if a given IP address is in any of the ranges and if yes, return the identifier. E.g.: IP 100.150.200.1 returns 'myrange' IP 100.150.201.1 returns 'myrange' IP 100.150.220.1 returns False IP 100.150.199.1 returns False
I know PostreSQL has some specific datatypes (INET, CIDR) that would makes this a lot easier, but is there any good way to get this doen with DynamoDB?