#aws-region #aws #cloudflare #deno #edge

aws-region-nearby

Find the nearest AWS region to a given location

13 releases

0.2.3 Dec 23, 2022
0.2.2 Oct 2, 2022
0.2.1 Sep 18, 2022
0.1.2 Jul 1, 2022
0.0.3-alpha Dec 30, 2021

#279 in WebAssembly

Download history 1411/week @ 2023-12-05 953/week @ 2023-12-12 332/week @ 2023-12-19 297/week @ 2023-12-26 1353/week @ 2024-01-02 1776/week @ 2024-01-09 928/week @ 2024-01-16 1765/week @ 2024-01-23 1435/week @ 2024-01-30 1759/week @ 2024-02-06 2270/week @ 2024-02-13 664/week @ 2024-02-20 1228/week @ 2024-02-27 1612/week @ 2024-03-05 1923/week @ 2024-03-12 1275/week @ 2024-03-19

6,155 downloads per month

MIT/Apache

35KB
681 lines

aws-region-nearby

Latest version Documentation CI

A Rust library to find the nearest AWS region to a given location.

Especially useful when you run code at the edge and want fast access to regional AWS services, e.g. Cloudflare Workers accessing DynamoDB global tables.

Check out the examples to learn how to use aws-region-nearby with different AWS SDKs, Cloudflare Workers, and Deno Deploy. The included infra code will deploy a replicated DynamoDB table for testing.

Many thanks to @tobilg for providing the original AWS region coordinates.

Quickstart

Add the crate as a dependency to your Cargo.toml:

[dependencies]
aws-region-nearby = "0.2"

Now you can start finding AWS regions.

License

Copyright (c) 2021-2022 Mathias Lafeldt

Licensed under the Apache License, Version 2.0 or the MIT license, at your option.

Dependencies

~0.5–1MB
~23K SLoC