#aws-region #cloudflare #aws #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

#445 in WebAssembly

Download history 402/week @ 2024-07-20 638/week @ 2024-07-27 1027/week @ 2024-08-03 784/week @ 2024-08-10 1215/week @ 2024-08-17 1333/week @ 2024-08-24 1478/week @ 2024-08-31 876/week @ 2024-09-07 1242/week @ 2024-09-14 1195/week @ 2024-09-21 284/week @ 2024-09-28 683/week @ 2024-10-05 53/week @ 2024-10-12 862/week @ 2024-10-19 556/week @ 2024-10-26 1511/week @ 2024-11-02

3,049 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
~22K SLoC