Managing schema for AWS Athena in GitOps-style

Overview

athena-rs

codecov cargo-clippy cargo-test Code coverage cargo-doc cargo-fmt

Managing AWS Athena Schemas

Installation

$ cargo install --git https://github.com/duyet/athena-rs
$ athena --help

athena 0.1.0
Duyet <[email protected]>
Managing AWS Athena Schemas

USAGE:
    athena <SUBCOMMAND>

OPTIONS:
    -h, --help       Print help information
    -V, --version    Print version information

SUBCOMMANDS:
    apply    Build and execute SQL to Athena
    build    Build SQL from template path
    help     Print this message or the help of the given subcommand(s)

Usages

Example project structure

.
├── base
│   ├── index.sql
│   ├── table_1.sql
│   └── table_2.sql
├── prd
│   └── index.sql
└── stg
    └── index.sql

File prd/index.sql:

{% set s3_bucket = "s3://prd" %}
{% include 'base/index.sql' %}

File base/index.sql:

{% include "base/table_1.sql" %}
{% include "base/table_2.sql" %}

File base/table_1.sql:

CREATE EXTERNAL TABLE IF NOT EXISTS `table_1` (
  id string,
  name string
) LOCATION '{{ s3_bucket }}/table_1';

1. Build SQL from template

Render for ./prd. This is using Tera template engine which is inspired by Jinja2 and Django templates.

$ cd examples && cargo run build ./prd
CREATE EXTERNAL TABLE IF NOT EXISTS `table_1` (
  id string,
  name string
) LOCATION 's3://prd/table_1';


CREATE EXTERNAL TABLE IF NOT EXISTS `table_2` (
  id string,
  name string
) LOCATION 's3://prd/table_2';

2. Apply SQL to Athena

$ cd examples && athena apply --output_location=s3://athena-output/ ./prd

Compatible with AWS Authentication methods: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html

Using AWS profile

$ cat ~/.aws/credentials
# [prd]
# aws_access_key_id=AKIAIOSFODNN7EXAMPLE
# aws_secret_access_key=wJalrXUtnFEMI/K7MDENGb/PxRfiCYEXAMPLEKEY

$ cd examples && athena apply --profile prd --region us-east-1 ./prd

Using environment variables

$ export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
$ export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
$ export AWS_DEFAULT_REGION=us-west-2

$ cd examples && athena apply ./prd

Example templates

  • Create Athena View: ./examples/base/view.sql

    -- Database: db1
    CREATE VIEW "view" AS SELECT * FROM table_2;
    
    /* Database: db2 */
    CREATE VIEW "view" AS SELECT * FROM table_1;
  • Add partitions date range: ./examples/base/table_1_partitions.sql

    ALTER TABLE table_name ADD IF NOT EXISTS
      PARTITION (date_key = "2022-01-01") LOCATION "s3://stg/table_1/year=2022/month=01/day=01",
      PARTITION (date_key = "2022-01-02") LOCATION "s3://stg/table_1/year=2022/month=01/day=02",
      ...

Limitations

  • Since Athena can run only one query in a session. So athena apply break the queries by semicolon ;. Must includes the semicolon ; at the end of each SQL statement.
  • CREATE VIEW:
    • As synopsis of Athena do not accept database name. So please add the database name before the query like this example: view.sql
    • Backquoted identifiers are not supported, use double quotes to quote identifiers.
  • Maybe a bugs of walkdir, cannot named a file as macros.sql

License

MIT.

Comments
  • fix(deps): update rust crate aws-config to 0.49.0

    fix(deps): update rust crate aws-config to 0.49.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | aws-config | dependencies | minor | 0.48.0 -> 0.49.0 |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ Warning: custom changes will be lost.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 2
  • fix(deps): update all non-major dependencies

    fix(deps): update all non-major dependencies

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | anyhow | dependencies | patch | 1.0.66 -> 1.0.68 | | indoc | dev-dependencies | patch | 1.0.7 -> 1.0.8 | | serial_test | dev-dependencies | minor | 0.9.0 -> 0.10.0 |


    Release Notes

    dtolnay/anyhow

    v1.0.68

    Compare Source

    • Opt out of -Zrustdoc-scrape-examples on docs.rs for now

    v1.0.67

    Compare Source

    • Improve the backtrace captured when context() is used on an Option (#​280)
    dtolnay/indoc

    v1.0.8

    Compare Source

    • Documentation improvements
    palfrey/serial_test

    v0.10.0

    Compare Source

    What's Changed

    New Contributors

    Full Changelog: https://github.com/palfrey/serial_test/compare/v0.9.0...v0.10.0


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • chore(deps): update all non-major dependencies

    chore(deps): update all non-major dependencies

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | assert_cmd | dev-dependencies | patch | 2.0.6 -> 2.0.7 | | aws-config | dependencies | minor | 0.51.0 -> 0.52.0 | | aws-sdk-athena | dependencies | minor | 0.21.0 -> 0.22.0 | | env_logger | dependencies | minor | 0.9.3 -> 0.10.0 | | predicates | dev-dependencies | patch | 2.1.3 -> 2.1.4 | | tokio (source) | dependencies | minor | 1.22.0 -> 1.23.0 |


    Release Notes

    assert-rs/assert_cmd

    v2.0.7

    Compare Source

    rust-cli/env_logger

    v0.10.0

    Compare Source

    MSRV changed to 1.60 to hide optional dependencies

    Fixes
    • Resolved soundness issue by switching from atty to is-terminal
    Breaking Changes

    To open room for changing dependencies:

    • Renamed termcolor feature to color
    • Renamed atty feature to auto-color
    assert-rs/predicates-rs

    v2.1.4

    Compare Source

    tokio-rs/tokio

    v1.23.0: Tokio v1.23.0

    Compare Source

    Fixed
    • net: fix Windows named pipe connect (#​5208)
    • io: support vectored writes for ChildStdin (#​5216)
    • io: fix async fn ready() false positive for OS-specific events (#​5231)
    Changed
    • runtime: yield_now defers task until after driver poll (#​5223)
    • runtime: reduce amount of codegen needed per spawned task (#​5213)
    • windows: replace winapi dependency with windows-sys (#​5204)

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • fix(deps): update rust crate tokio to 1.22.0

    fix(deps): update rust crate tokio to 1.22.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | tokio (source) | dependencies | minor | 1.21.2 -> 1.22.0 |


    Release Notes

    tokio-rs/tokio

    v1.22.0: Tokio v1.22.0

    Compare Source

    Added
    • runtime: add Handle::runtime_flavor (#​5138)
    • sync: add Mutex::blocking_lock_owned (#​5130)
    • sync: add Semaphore::MAX_PERMITS (#​5144)
    • sync: add merge() to semaphore permits (#​4948)
    • sync: add mpsc::WeakUnboundedSender (#​5189)
    Added (unstable)
    • process: add Command::process_group (#​5114)
    • runtime: export metrics about the blocking thread pool (#​5161)
    • task: add task::id() and task::try_id() (#​5171)
    Fixed
    • macros: don't take ownership of futures in macros (#​5087)
    • runtime: fix Stacked Borrows violation in LocalOwnedTasks (#​5099)
    • runtime: mitigate ABA with 32-bit queue indices when possible (#​5042)
    • task: wake local tasks to the local queue when woken by the same thread (#​5095)
    • time: panic in release mode when mark_pending called illegally (#​5093)
    • runtime: fix typo in expect message (#​5169)
    • runtime: fix unsync_load on atomic types (#​5175)
    • task: elaborate safety comments in task deallocation (#​5172)
    • runtime: fix LocalSet drop in thread local (#​5179)
    • net: remove libc type leakage in a public API (#​5191)
    • runtime: update the alignment of CachePadded (#​5106)
    Changed
    • io: make tokio::io::copy continue filling the buffer when writer stalls (#​5066)
    • runtime: remove coop::budget from LocalSet::run_until (#​5155)
    • sync: make Notify panic safe (#​5154)
    Documented
    • io: fix doc for write_i8 to use signed integers (#​5040)
    • net: fix doc typos for TCP and UDP set_tos methods (#​5073)
    • net: fix function name in UdpSocket::recv documentation (#​5150)
    • sync: typo in TryLockError for RwLock::try_write (#​5160)
    • task: document that spawned tasks execute immediately (#​5117)
    • time: document return type of timeout (#​5118)
    • time: document that timeout checks only before poll (#​5126)
    • sync: specify return type of oneshot::Receiver in docs (#​5198)
    Internal changes
    • runtime: use const Mutex::new for globals (#​5061)
    • runtime: remove Option around mio::Events in io driver (#​5078)
    • runtime: remove a conditional compilation clause (#​5104)
    • runtime: remove a reference to internal time handle (#​5107)
    • runtime: misc time driver cleanup (#​5120)
    • runtime: move signal driver to runtime module (#​5121)
    • runtime: signal driver now uses I/O driver directly (#​5125)
    • runtime: start decoupling I/O driver and I/O handle (#​5127)
    • runtime: switch io::handle refs with scheduler:Handle (#​5128)
    • runtime: remove Arc from I/O driver (#​5134)
    • runtime: use signal driver handle via scheduler::Handle (#​5135)
    • runtime: move internal clock fns out of context (#​5139)
    • runtime: remove runtime::context module (#​5140)
    • runtime: keep driver cfgs in driver.rs (#​5141)
    • runtime: add runtime::context to unify thread-locals (#​5143)
    • runtime: rename some confusing internal variables/fns (#​5151)
    • runtime: move coop mod into runtime (#​5152)
    • runtime: move budget state to context thread-local (#​5157)
    • runtime: move park logic into runtime module (#​5158)
    • runtime: move Runtime into its own file (#​5159)
    • runtime: unify entering a runtime with Handle::enter (#​5163)
    • runtime: remove handle reference from each scheduler (#​5166)
    • runtime: move enter into context (#​5167)
    • runtime: combine context and entered thread-locals (#​5168)
    • runtime: fix accidental unsetting of current handle (#​5178)
    • runtime: move CoreStage methods to Core (#​5182)
    • sync: name mpsc semaphore types (#​5146)

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • chore(deps): update rust crate predicates to 2.1.3

    chore(deps): update rust crate predicates to 2.1.3

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | predicates | dev-dependencies | patch | 2.1.2 -> 2.1.3 |


    Release Notes

    assert-rs/predicates-rs

    v2.1.3

    Compare Source


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • fix(deps): update rust crate chrono to 0.4.23

    fix(deps): update rust crate chrono to 0.4.23

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | chrono | dependencies | patch | 0.4.22 -> 0.4.23 |


    Release Notes

    chronotope/chrono

    v0.4.23: 0.4.23

    Compare Source

    0.4.23 is the next 0.4 release of the popular chrono date and time library for Rust. After the 0.4.20-0.4.22 series that brought chrono back to life after a long hiatus, development has been fairly quiet, allowing us to start planning changes for the 0.5.0 release. As such, we've started deprecating some APIs that are likely to be removed in 0.5. If you have any feedback on these changes, please let us know in the issue tracker!

    Deprecations
    • Deprecate methods that have an _opt() alternative (#​827)
    • Deprecate usage of the Date<Tz> type (#​851)
    Features
    Fixes
    • Support tzdb location on AIX (#​826)
    • Fix warnings in documentation (#​847)

    On behalf of @​esheppa and @​djc, thanks to all contributors!


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • chore(deps): update actions-rs/toolchain digest to 16499b5

    chore(deps): update actions-rs/toolchain digest to 16499b5

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | actions-rs/toolchain | action | digest | 88dc235 -> 16499b5 |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • fix(deps): update all non-major dependencies

    fix(deps): update all non-major dependencies

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | anyhow | dependencies | patch | 1.0.65 -> 1.0.66 | | assert_cmd | dev-dependencies | patch | 2.0.4 -> 2.0.6 | | aws-config | dependencies | minor | 0.49.0 -> 0.51.0 | | aws-sdk-athena | dependencies | minor | 0.19.0 -> 0.21.0 | | clap | dependencies | patch | 3.2.22 -> 3.2.23 | | env_logger | dependencies | patch | 0.9.1 -> 0.9.3 | | predicates | dev-dependencies | patch | 2.1.1 -> 2.1.2 | | regex | dependencies | minor | 1.6.0 -> 1.7.0 |


    Release Notes

    dtolnay/anyhow

    v1.0.66

    Compare Source

    • Reduce unhelpful backtrace frames in backtraces captured during a context call (#​279)
    assert-rs/assert_cmd

    v2.0.6

    Compare Source

    Fixes
    • Hide internal-only optional dependenices

    v2.0.5

    Compare Source

    Features
    • Added AssertError::assert
    clap-rs/clap

    v3.2.23

    Compare Source

    [3.2.23] - 2022-10-24

    Fixes
    • Upgrade to textwrap 0.16
    env-logger-rs/env_logger

    v0.9.3

    Compare Source

    Fix a regression from v0.9.2 where env_logger would fail to compile with the termcolor feature turned off.

    v0.9.2

    Compare Source

    Fix and un-deprecate Target::Pipe, which was basically not working at all before and deprecated in 0.9.1.

    assert-rs/predicates-rs

    v2.1.2

    Compare Source

    Compatibility

    Update MSRV to 1.60

    Fixes
    • Hide internal-only optional dependencies
    rust-lang/regex

    v1.7.0

    Compare Source

    ================== This release principally includes an upgrade to Unicode 15.

    New features:


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • fix(deps): update rust crate tokio to 1.21.2

    fix(deps): update rust crate tokio to 1.21.2

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | tokio (source) | dependencies | patch | 1.21.1 -> 1.21.2 |


    Release Notes

    tokio-rs/tokio

    v1.21.2

    Compare Source

    1.21.2 (September 27, 2022)

    This release removes the dependency on the once_cell crate to restore the MSRV of 1.21.x, which is the latest minor version at the time of release. (#​5048)


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • fix(deps): update rust crate tera to 1.17.1

    fix(deps): update rust crate tera to 1.17.1

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | tera (source) | dependencies | patch | 1.17.0 -> 1.17.1 |


    Release Notes

    Keats/tera

    v1.17.1

    Compare Source

    • Make get_random use isize instead of i32 and bad error message
    • Fix variables lookup when the evaluated key has a . or quotes
    • Fix changed output of f64 from serde_json 1.0.85

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • fix(deps): update rust crate env_logger to 0.9.1

    fix(deps): update rust crate env_logger to 0.9.1

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | env_logger | dependencies | patch | 0.9.0 -> 0.9.1 |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • chore(deps): update rust crate predicates to 2.1.5

    chore(deps): update rust crate predicates to 2.1.5

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | predicates | dev-dependencies | patch | 2.1.4 -> 2.1.5 |


    Release Notes

    assert-rs/predicates-rs

    v2.1.5

    Compare Source

    Gixes
    • Further generalized borrowing of predicates with Borrow trait

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • fix(deps): update rust crate clap to v4

    fix(deps): update rust crate clap to v4

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | clap | dependencies | major | 3.2.23 -> 4.0.32 |


    Release Notes

    clap-rs/clap

    v4.0.32

    Compare Source

    Fixes
    • (parser) When overriding required(true), consider args that conflict with its group

    v4.0.31

    Compare Source

    Performance
    • Speed up parsing when a lot of different flags are present (100 unique flags)

    v4.0.30

    Compare Source

    Fixes
    • (error) Improve error for args_conflicts_with_subcommand

    v4.0.29

    Compare Source

    v4.0.28

    Compare Source

    Fixes
    • Fix wasm support which was broken in 4.0.27

    v4.0.27

    Compare Source

    Features
    • Have Arg::value_parser accept Vec<impl Into<PossibleValue>>
    • Implement Display and FromStr for ColorChoice
    Fixes
    • Remove soundness issue by switching from atty to is-terminal

    v4.0.26

    Compare Source

    Fixes
    • (error) Fix typos in ContextKind::as_str

    v4.0.25

    Compare Source

    Features
    • (error) Report available subcommands when required subcommand is missing

    v4.0.24

    Compare Source

    Fixes
    • Avoid panic when printing an argument that isn't built

    v4.0.23

    Compare Source

    Fixes
    • Don't panic on reporting invalid-long errors when followed by invalid UTF8
    • (help) Clarified argument to help subcommand

    v4.0.22

    Compare Source

    Fixes
    • (help) Don't overflow into next-line-help early due to stale (pre-v4) padding calculations

    v4.0.21

    Compare Source

    Features
    • (derive) long_about and long_help attributes, without a value, force using doc comment (before it wouldn't be set if there wasn't anything different than the short help)

    v4.0.20

    Compare Source

    Fixes
    • (derive) Allow defaulted value parser for '()' fields

    v4.0.19

    Compare Source

    Features
    • ColorChoice now implements ValueEnum

    v4.0.18

    Compare Source

    Fixes
    • (derive) Allow #[command(skip)] to also work with enum variants with a value

    v4.0.17

    Compare Source

    Fixes
    • Allow using Arg::last(true) with Arg::value_hint(ValueHint::CommandWithArguments)

    v4.0.16

    Compare Source

    Fixes
    • Arg::exclusive(true) should not be exclusive with the argument's own ArgGroup

    v4.0.15

    Compare Source

    Fixes
    • (error) Don't suggest -- when it doesn't help
    • (error) Be more consistent in quoting, punctuation, and indentation in errors

    v4.0.14

    Compare Source

    Fixes
    • Only put ArgGroup in ArgMatches when explicitly specified, fixing derives handling of option-flattened fields (#​4375)

    v4.0.13

    Compare Source

    Features
    • (derive) Allow () for fields to mean "don't read" (#​4371)

    v4.0.12

    Compare Source

    Features
    • Added TypedValueParser::try_map for when adapting an existing TypedValueParser can fail
    • (error) Create errors like clap with Error::new, Error::with_cmd, and Error::insert

    v4.0.11

    Compare Source

    Fixes
    • (help) Fix wrapping calculations with ANSI escape codes

    v4.0.10

    Compare Source

    Features

    v4.0.9

    Compare Source

    Fixes
    • (derive) Process doc comments for #[command(subcommand)] like in clap v3

    v4.0.8

    Compare Source

    Fixes
    • (derive) Remove a low-value assert preventing defaulting Help and Version actions

    v4.0.7

    Compare Source

    Features
    • (derive) Populate implicit ArgGroup (#​3165)
    Fixes
    • (derive) Support #[group(skip)] on Parser derive
    • (derive) Tell users about implicit arg groups when running into group name conflicts
    • (error) Don't report unrelated groups in conflict or requires errors

    v4.0.6

    Compare Source

    Features

    v4.0.5

    Compare Source

    v4.0.4

    Compare Source

    Fixes
    • (error) Specialize the self-conflict error to look like clap v3

    v4.0.3

    Compare Source

    Fixes
    • (parser) When overriding required(true), consider args that conflict with its group

    v4.0.2

    Compare Source

    v4.0.1

    Compare Source

    Features
    • ColorChoice now implements ValueEnum

    v4.0.0

    Compare Source

    Highlights

    Arg::num_args(range)

    Clap has had several ways for controlling how many values will be captured without always being clear on how they interacted, including

    • Arg::multiple_values(true)
    • Arg::number_of_values(4)
    • Arg::min_values(2)
    • Arg::max_values(20)
    • Arg::takes_value(true)

    These have now all been collapsed into Arg::num_args which accepts both single values and ranges of values. num_args controls how many raw arguments on the command line will be captured as values per occurrence and independent of value delimiters.

    See Issue 2688 for more background.

    Polishing Help

    Clap strives to give a polished CLI experience out of the box with little ceremony. With some feedback that has accumulated over time, we took this release as an opportunity to re-evaluate our --help output to make sure it is meeting that goal.

    In doing this evaluation, we wanted to keep in mind:

    • Whether other CLIs had ideas that make sense to apply
    • Providing an experience that fits within the rest of applications and works across all shells

    Before:

    git
    A fictional versioning CLI
    
    USAGE:
        git <SUBCOMMAND>
    
    OPTIONS:
        -h, --help    Print help information
    
    SUBCOMMANDS:
        add      adds things
        clone    Clones repos
        help     Print this message or the help of the given subcommand(s)
        push     pushes things
        stash
    

    After:

    A fictional versioning CLI
    
    Usage: git <COMMAND>
    
    Commands:
      clone  Clones repos
      push   pushes things
      add    adds things
      stash
      help   Print this message or the help of the given subcommand(s)
    
    Options:
      -h, --help  Print help information
    
    • name/version header was removed because we couldn't justify the space it occupied when
      • Usage already includes the name
      • --version is available for showing the same thing (if the program has a version set)
    • Usage was dropped to one line to save space
    • Focus is put on the subcommands
    • Headings are now Title case
    • The more general term "command" is used rather than being explicit about being "subcommands"
    • The output is more dense with the expectation that it won't affect legibility but will allow more content
    • We've moved to a more neutral palette for highlighting elements (not highlighted above)

    In talking to users, we found some that liked clap's man-like experience. When deviating from this, we are making the assumption that those are more power users and that the majority of users wouldn't look as favorably on being consistent with man.

    See Issue 4132 for more background.

    More Dynamicism

    Clap's API has focused on &str for performance but this can make dealing with owned data difficult, like #[arg(default_value_t)] generating a String from the default value.

    Additionally, to avoid ArgMatches from borrowing (and for some features we decided to forgo), clap took the &str argument IDs and hashed them. This prevented us from providing a usable API for iterating over existing arguments.

    Now clap has switched to a string newtype that gives us the flexibility to decide whether to use &'static str, Cow<'static, str> for fast dynamic behavior, or Box<str> for dynamic behavior with small binary size.

    As an extension of that work, you can now call ArgMatches::ids to iterate over the arguments and groups that were found when parsing. The newtype Id was used to prevent some classes of bugs and to make it easier to understand when opaque Ids are used vs user-visible strings.

    Clearing Out Deprecations

    Instead of doing all development on clap 4.0.0, we implemented a lot of new features during clap 3's development, deprecating the old API while introducing the new API, including:

    • Replacing the implicit behavior for args when parsing them with ArgAction
    • Replacing various one-off forms of value validation with the ValueParser API
      • Allowing derives to automatically do the right thing for PathBuf (allowing invalid UTF-8)
    • Replacing AppSettings and ArgSettings enums with getters/setters
    • Clarifying terms and making them more consistent
    Migrating

    Steps:

    1. Upgrade to v3 if you haven't already
    2. Add CLI tests (including example below), -h and --help output at a minimum (recommendation: trycmd for snapshot testing)
    3. If using Builder API: Explicitly set the arg.action(ArgAction::...) on each argument (StoreValue for options and IncOccurrences for flags)
    4. Run cargo check --features clap/deprecated and resolve all deprecation warnings
    5. Upgrade to v4
    6. Update feature flags
    • If default-features = false, run cargo add clap -F help,usage,error-context
    • Run cargo add clap -F wrap_help unless you want to hard code line wraps
    1. Resolve compiler errors
    2. Resolve behavior changes (see "subtle changes" under BREAKING CHANGES)
    3. At your leisure: resolve new deprecation notices

    Example test (derive):

    
    #[derive(clap::Parser)]
    struct Cli {
        ...
    }
    
    #[test]
    fn verify_cli() {
        use clap::CommandFactory;
        Cli::command().debug_assert()
    }
    

    Example test (builder):

    fn cli() -> clap::Command {
        ...
    }
    
    #[test]
    fn verify_cli() {
        cli().debug_assert();
    }
    

    Note: the idiomatic / recommended way of specifying different types of args in the Builder API has changed:

    Before

    .arg(Arg::new("flag").long("flag"))  # --flag
    .arg(Arg::new("option").long("option").takes_value(true))  # --option <option>
    

    After:

    .arg(Arg::new("flag").long("flag").action(ArgAction::SetTrue))  # --flag
    .arg(Arg::new("option").long("option"))  # --option <option>
    

    In particular, num_args (the replacement for takes_value) will default appropriately from the ArgAction and generally only needs to be set explicitly for the other num_args use cases.

    Breaking Changes

    Subtle changes (i.e. compiler won't catch):

    • arg! now sets one of (#​3795):
      • ArgAction::SetTrue, requiring ArgMatches::get_flag instead of ArgMatches::is_present
      • ArgAction::Count, requiring ArgMatches::get_count instead of ArgMatches::occurrences_of
      • ArgAction::Set, requiring ArgMatches::get_one instead of ArgMatches::value_of
      • ArgAction::Append, requiring ArgMatches::get_many instead of ArgMatches::values_of
    • ArgAction::Set, ArgAction::SetTrue, and Arg::Action::SetFalse now conflict by default to be like ArgAction::StoreValue and ArgAction::IncOccurrences, requiring cmd.args_override_self(true) to override instead (#​4261)
    • By default, an Args default action is ArgAction::Set, rather than ArgAction::IncOccurrence to reduce confusing magic through consistency (#​2687, #​4032, see also #​3977)
    • mut_arg can no longer be used to customize help and version arguments, instead disable them (Command::disable_help_flag, Command::disable_version_flag) and provide your own (#​4056)
    • Removed lifetimes from Command, Arg, ArgGroup, and PossibleValue, assuming 'static. string feature flag will enable support for Strings (#​1041, #​2150, #​4223)
    • arg!(--flag <value>) is now optional, instead of required. Add .required(true) at the end to restore the original behavior (#​4206)
    • Added default feature flags, help, usage and error-context, requiring adding them back in if default-features = false (#​4236)
    • (parser) Always fill in "" argument for external subcommands to make it easier to distinguish them from built-in commands (#​3263)
    • (parser) Short flags now have higher precedence than hyphen values with Arg::allow_hyphen_values, to be consistent with Command::allow_hyphen_values (#​4187)
    • (parser) Arg::value_terminator must be its own argument on the CLI rather than being in a delimited list (#​4025)
    • (help) Line wrapping of help is now behind the existing wrap_help feature flag, either enable it or hard code your wraps (#​4258)
    • (help) Make DeriveDisplayOrder the default and removed the setting. To sort help, set next_display_order(None) (#​2808)
    • (help) Subcommand display order respects Command::next_display_order instead of DeriveDisplayOrder and using its own initial display order value (#​2808)
    • (help) Subcommands are now listed before arguments. To get the old behavior, see Command::help_template (#​4132)
    • (help) Help headings are now title cased, making any user-provided help headings inconsistent. To get the old behavior, see Command::help_template, Arg::help_heading, and Command::subcommand_help_heading (#​4132)
    • (help) "Command" is used as the section heading for subcommands and COMMAND for the value name. To get the old behavior, see Command::subcommand_help_heading and Arg::subcommand_value_name (#​4132, #​4155)
    • (help) Whitespace in help output is now trimmed to ensure consistency regardless of how well a template matches the users needs. (#​4132, #​4156)
    • (help) name/version/author are removed by default from help output. To get the old behavior, see Command::help_template. (#​4132, #​4160)
    • (help) Indentation for second-line usage changed. (#​4132, #​4188)
    • (env) Parse --help and --version like any ArgAction::SetTrue flag (#​3776)
    • (derive) Leave Arg::id as verbatim casing, requiring updating of string references to other args like in conflicts_with or requires (#​3282)
    • (derive) Doc comments for ValueEnum variants will now show up in --help (#​3312)
    • (derive) When deriving Args, and ArgGroup is created using the type's name, reserving it for future use (#​2621, #​4209)
    • (derive) next_help_heading can now leak out of a #[clap(flatten)], like all other command settings (#​4222)

    Easier to catch changes:

    • Looking up a group in ArgMatches now returns the arg Ids, rather than the values to reduce overhead and offer more flexibility. (#​4072)
    • Changed Arg::number_of_values (average-across-occurrences) to Arg::num_args (per-occurrence) (raw CLI args, not parsed values) (#​2688, #​4023)
      • num_args(0) no longer implies takes_value(true).multiple_values(true) (#​4023)
      • num_args(1) no longer implies multiple_values(true) (#​4023)
      • Does not check default or env values, only what the user explicitly passes in (#​4025)
      • No longer terminates on delimited values (#​4025)
    • Replace Arg::min_values (across all occurrences) with Arg::num_args(N..) (per occurrence) to reduce confusion over different value count APIs (#​4023)
    • Replace Arg::max_values (across all occurrences) with Arg::num_args(1..=M) (per occurrence) to reduce confusion over different value count APIs (#​4023)
    • Replace Arg::multiple_values(true) with Arg::num_args(1..) and Arg::multiple_values(false) with Arg::num_args(0) to reduce confusion over different value count APIs (#​4023)
    • Replace Arg::takes_value(true) with Arg::num_args(1) and Arg::takes_value(false) with Arg::num_args(0) to reduce confusion over different value count APIs
    • Remove Arg::require_value_delimiter, either users could use Arg::value_delimiter or implement a custom parser with TypedValueParser as it was mostly to make multiple_values(true) act like multiple_values(false) and isn't needed anymore (#​4026)
    • Arg::new("help") and Arg::new("version") no longer implicitly disable the built-in flags and be copied to all subcommands, instead disable the built-in flags (Command::disable_help_flag, Command::disable_version_flag) and mark the custom flags as global(true). (#​4056)
    • Arg::short('h') no longer implicitly disables the short flag for help, instead disable the built-in flags (Command::disable_help_flag, Command::disable_version_flag) provide your own Arg::new("help").long("help").action(ArgAction::Help).global(true). (#​4056)
    • ArgAction::SetTrue and ArgAction::SetFalse now prioritize Arg::default_missing_value over their standard behavior (#​4000)
    • Changed Arg::requires_ifs and Arg::default_value*_ifs* to taking an ArgPredicate, removing ambiguity with None when accepting owned and borrowed types (#​4084)
    • Removed PartialEq and Eq from Command so we could change external subcommands to use a ValueParser (#​3990)
    • Various Arg, Command, and ArgGroup calls were switched from accepting &[] to [] via IntoIterator to be more flexible (#​4072)
    • Arg::short_aliases and other builder functions that took &[] need the & dropped (#​4081)
    • ErrorKind and Result moved into the error module
    • ErrorKind::EmptyValue replaced with ErrorKind::InvalidValue to remove an unnecessary special case (#​3676, #​3968)
    • ErrorKind::UnrecognizedSubcommand replaced with ErrorKind::InvalidSubcommand to remove an unnecessary special case (#​3676)
    • Changed the default type of allow_external_subcommands from String to OsString as that is less likely to cause bugs in user applications (#​3990)
    • (help) Command::render_usage now returns a StyledStr (#​4248)
    • (derive) Changed the default for arguments from parse to value_parser, removing parse support (#​3827, #​3981)
      • #[clap(value_parser)] and #[clap(action)] are now redundant
    • (derive) subcommand_required(true).arg_required_else_help(true) is set instead of SubcommandRequiredElseHelp to give more meaningful errors when subcommands are missing and to reduce redundancy (#​3280)
    • (derive) Remove arg_enum attribute in favor of value_enum to match the new name (we didn't have support in v3 to mark it deprecated) (#​4127)
    • (parser) Assert when the CLI looksup an unknown args when external subcommand support is enabled to help catch bugs (#​3703)
    • (assert) Sometimes Arg::default_missing_value didn't require num_args(0..=N), now it does (#​4023)
    • (assert) Leading dashes in Arg::long are no longer allowed (#​3691)
    • (assert) Disallow more value_names than num_args (#​2695)
    • (assert) Always enforce that version is specified when the ArgAction::Version is used
    • (assert) Add missing #[track_caller]s to make it easier to debug asserts
    • (assert) Ensure overrides_with IDs are valid
    • (assert) Ensure no self-overrides_with now that Actions replace it
    • (assert) Ensure subcommand names are not duplicated
    • (assert) Assert on mut_arg receiving an invalid arg ID or mut_subcommand receiving an invalid command name
    Compatibility

    MSRV is now 1.60.0

    Deprecated

    • Arg::use_value_delimiter in favor of Arg::value_delimiter to avoid having multiple ways of doing the same thing
    • Arg::requires_all in favor of Arg::requires_ifs now that it takes an ArgPredicate to avoid having multiple ways of doing the same thing
    • Arg::number_of_values in favor of Arg::num_args to clarify semantic differences
    • default_value_os, default_values_os, default_value_if_os, and default_value_ifs_os as the non _os variants now accept either a str or an OsStr (#​4141)
    • Arg::env_os in favor of Arg::env
    • Command::dont_collapse_args_in_usage is now the default (#​4151)
    • Command::trailing_var_arg in favor of Arg::trailing_var_arg to make it clearer which arg it is meant to apply to (#​4187)
    • Command::allow_hyphen_values in favor of Arg::allow_hyphen_values to make it clearer which arg it is meant to apply to (#​4187)
    • Command::allow_negative_numbers in favor of Arg::allow_negative_numbers to make it clearer which arg it is meant to apply to (#​4187)
    • (help) Deprecated Command::write_help and Command::write_long_help in favor of Command::render_help and Command::render_long_help (#​4248)
    • (derive) structopt and clap attributes in favor of the more specific command, arg, and value to open the door for more features and clarify relationship to the builder (#​1807, #​4180)
    • (derive) #[clap(value_parser)] and #[clap(action)] defaulted attributes (its the default) (#​3976)

    Behavior Changes

    • (help) With wrap_help feature, if the terminal size cannot be determined, LINES and COLUMNS variables are used (#​4186)
    Features
    • Arg::num_args now accepts ranges, allowing setting both the minimum and maximum number of values per occurrence (#​2688, #​4023)
    • Allow non-bool value_parsers for ArgAction::SetTrue / ArgAction::SetFalse (#​4092)
    • Add From<&OsStr>, From<OsString>, From<&str>, and From<String> to value_parser! (#​4257)
    • Allow resetting most builder methods
    • Can now pass runtime generated data to Command, Arg, ArgGroup, PossibleValue, etc without managing lifetimes with the string feature flag (#​2150, #​4223)
    • New default error-context, help and usage feature flags that can be turned off for smaller binaries (#​4236)
    • Added StyledStr::ansi() to Display with ANSI escape codes (#​4248)
    • (error) Error::apply for changing the formatter for dropping binary size (#​4111)
    • (error) Error::renderfor formatting the error into a StyledStr
    • (help) Show PossibleValue::help in long help (--help) (#​3312)
    • (help) New {tab} variable for Command::help_template (#​4161)
    • (help) Command::render_help and Command::render_long_help for formatting the error into a StyledStr (#​3873, #​4248)
    • (help) Command::render_usage now returns a StyledStr (#​4248)
    Fixes
    • Verify required is not used with conditional required settings (#​3660)
    • Replaced cmd.allow_invalid_for_utf8_external_subcommands with cmd.external_subcommand_value_parser (#​3733)
    • Arg::default_missing_value now applies per occurrence rather than if a value is missing across all occurrences (#​3998)
    • arg!(--long [value]) to accept 0..=1 per occurrence rather than across all occurrences, making it safe to use with ArgAction::Append (#​4001)
    • Allow OsStrs for Arg::{required_if_eq,required_if_eq_any,required_if_eq_all} (#​4084)
    • (help) With wrap_help feature, if the terminal size cannot be determined, LINES and COLUMNS variables are used (#​4186)
    • (help) Use Command::display_name in the help title rather than Command::bin_name
    • (help) Show when a flag is ArgAction::Count by adding an ... (#​4003)
    • (help) Use a more neutral palette for coloring (#​4132, #​4117)
    • (help) Don't rely on ALL CAPS for help headers (#​4132, #​4123)
    • (help) List subcommands first, focusing the emphasis on them (#​4132, #​4125)
    • (help) Do not include global args in cmd help help (#​4131)
    • (help) Use [positional] in list when relevant (#​4144)
    • (help) Show all [positional] in usage (#​4151)
    • (help) Polish up subcommands by referring to them as commands (#​4132, #​4155)
    • (help) Trim extra whitespace to avoid artifacts from different uses of templates (#​4132, #​4156)
    • (help) Hint to the user the difference between -h / --help when applicable (#​4132, #​4159)
    • (help) Shorten help by eliding name/version/author (#​4132, #​4160)
    • (help) When short help is long enough to activate next_line_help, don't add blank lines (#​4132, #​4190)
    • (help) Make help output more dense (reducing horizontal whitespace) (#​4132, #​4192)
    • (help) Separate subcommand flags with "," like option flags (#​4232, #​4235)
    • (help) Quote the suggested help flag (#​4220)
    • (version) Use Command::display_name rather than Command::bin_name (#​3966)
    • (parser) Always fill in "" argument for external subcommands (#​3263)
    • (parser) Short flags now have higher precedence than hyphen values with Arg::allow_hyphen_values, like Command::allow_hyphen_values (#​4187)
    • (parser) Prefer InvalidSubcommand over UnknownArgument in more cases (#​4219)
    • (derive) Detect escaped external subcommands that look like built-in subcommands (#​3703)
    • (derive) Leave Arg::id as verbatim casing (#​3282)
    • (derive) Default to #[clap(value_parser, action)] instead of #[clap(parse)] (#​3827)

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Dependency Dashboard

    Dependency Dashboard

    This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

    Open

    These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

    Detected dependencies

    cargo
    Cargo.toml
    • anyhow 1.0.68
    • aws-config 0.52.0
    • aws-sdk-athena 0.22.0
    • bat 0.22.1
    • chrono 0.4.23
    • clap 3.2.23
    • devtimer 4.0.1
    • env_logger 0.10.0
    • log 0.4.17
    • regex 1.7.0
    • tera 1.17.1
    • tokio 1.23.0
    • walkdir 2.3.2
    • assert_cmd 2.0.7
    • indoc 1.0.8
    • predicates 2.1.4
    • serial_test 0.10.0
    • tempfile 3.3.0
    github-actions
    .github/workflows/cargo-clippy.yml
    • actions/checkout v3
    • actions-rs/toolchain v1@16499b5e05bf2e26879000db0c1d13f7e13fa3af
    • github/codeql-action v2
    .github/workflows/cargo-doc.yaml
    • actions/checkout v3
    • actions/configure-pages v2
    • actions/upload-pages-artifact v1
    .github/workflows/cargo-fmt.yaml
    • actions/checkout v3
    .github/workflows/cargo-test.yaml
    • actions/checkout v3
    • actions-rs/toolchain v1
    .github/workflows/cov.yaml
    • actions/checkout v3
    • actions-rs/toolchain v1
    • actions-rs/cargo v1
    • actions-rs/install v0.1
    • actions-rs/grcov v0.1
    • codecov/codecov-action v3
    .github/workflows/gen.yaml
    • actions/checkout v3
    • EndBug/add-and-commit v9

    • [ ] Check this box to trigger a request for Renovate to run again on this repository
    opened by renovate[bot] 0
Owner
Duyet Le
Sr. Data Engineer @ Fossil (Web, Data Engineering, NLP, Cloud). Rustacean at night.
Duyet Le
Aws-sdk-rust - AWS SDK for the Rust Programming Language

The AWS SDK for Rust This repo contains the new AWS SDK for Rust (the SDK) and its public roadmap. Please Note: The SDK is currently released as a dev

Amazon Web Services - Labs 2k Jan 3, 2023
Rs.aws-login - A command line utility to simplify logging into AWS services.

aws-login A command line utility to simplify logging into AWS accounts and services. $ aws-login use ? Please select a profile to use: › ❯ dev-read

Kevin Herrera 11 Oct 30, 2022
Remote Secret Editor for AWS Secret Manager

Barberousse - Remote Secrets Editor About Usage Options Printing Editing Copying RoadMap 1.0 1.1 Future About A project aimed to avoid downloading sec

Mohamed Zenadi 18 Sep 28, 2021
Rust client for AWS Infinidash service.

AWS Infinidash - Fully featured Rust client Fully featured AWS Infinidash client for Rust applications. You can use the AWS Infinidash client to make

Rafael Carício 15 Feb 12, 2022
Rusoto is an AWS SDK for Rust

Rusoto is an AWS SDK for Rust You may be looking for: An overview of Rusoto AWS services supported by Rusoto API documentation Getting help with Rusot

null 2.6k Jan 3, 2023
Easy switch between AWS Profiles and Regions

AWSP - CLI To Manage your AWS Profiles! AWSP provides an interactive terminal to interact with your AWS Profiles. The aim of this project is to make i

KubeOps Skills 14 Dec 25, 2022
Simple fake AWS Cognito User Pool API server for development.

Fakey Cognito ?? Homepage Simple fake AWS Cognito API server for development. ✅ Implemented features AdminXxx on User Pools API. Get Started # run wit

naokirin 4 Aug 30, 2022
Postgres proxy which allows tools that don't natively supports IAM auth to connect to AWS RDS instances.

rds-iamauth-proxy rds-proxy lets you make use of IAM-based authentication to AWS RDS instances from tools that don't natively support that method of a

Gold Fig Labs Inc. 10 Nov 7, 2022
A tool to run web applications on AWS Lambda without changing code.

AWS Lambda Adapter A tool to run web applications on AWS Lambda without changing code. How does it work? AWS Lambda Adapter supports AWS Lambda functi

AWS Samples 321 Jan 2, 2023
Cookiecutter templates for Serverless applications using AWS SAM and the Rust programming language.

Cookiecutter SAM template for Lambda functions in Rust This is a Cookiecutter template to create a serverless application based on the Serverless Appl

AWS Samples 24 Nov 11, 2022
📦 🚀 a smooth-talking smuggler of Rust HTTP functions into AWS lambda

lando ?? maintenance mode ahead ?? As of this announcement AWS not officialy supports Rust through this project. As mentioned below this projects goal

Doug Tangren 68 Dec 7, 2021
Ref Arch: Serverless GraphQL in Rust on AWS

A Whole Hog Reference Architecture for an Apollo Federation-Ready, Serverless, Rust-Based GraphQL Microservice on AWS using Cloud Development Kit (CDK)

Michael Edelman 3 Jan 12, 2022
cargo-lambda a Cargo subcommand to help you work with AWS Lambda

cargo-lambda cargo-lambda is a Cargo subcommand to help you work with AWS Lambda. This subcommand compiles AWS Lambda functions natively and produces

David Calavera 184 Jan 5, 2023
cargo-lambda is a Cargo subcommand to help you work with AWS Lambda.

cargo-lambda cargo-lambda is a Cargo subcommand to help you work with AWS Lambda. The new subcommand creates a basic Rust package from a well defined

null 184 Jan 5, 2023
A Rust runtime for AWS Lambda

Rust Runtime for AWS Lambda This package makes it easy to run AWS Lambda Functions written in Rust. This workspace includes multiple crates: lambda-ru

Amazon Web Services - Labs 2.4k Dec 29, 2022
Nitrogen - a tool for deploying web services to AWS Nitro Enclaves

Nitrogen CLI Nitrogen is a tool for deploying web services to AWS Nitro Enclaves. Given a dockerfile and an ssh key, Nitrogen will spin up an EC2, con

Cape Privacy 57 Dec 26, 2022
This repo is a sample video search app using AWS services.

Video Search This repo is a sample video search app using AWS services. You can check the demo on this link. Features Transcribing Video and generate

AWS Samples 8 Jan 5, 2023
Serverless search for AWS.

Pathery ?? Serverless Search ?? Pathery is a serverless search service built on AWS using Rust, CDK and Tantivy. ?? WARNING: This is currently a work

Tyler van Hensbergen 40 Jan 3, 2023
This repo scans pypi, rubygems and hexpm for AWS keys

What is this? This is a project to try to detect any AWS access keys that are accidentally uploaded to the Python Package Index (PyPi). New uploads ar

Tom Forbes 80 Jan 28, 2023