Skip to content

Commit 0fccbab

Browse files
committed
Many of the issues got fixed thanks to the PR awslabs/aws-lambda-rust-runtime#332
1 parent d7ea103 commit 0fccbab

File tree

1 file changed

+3
-57
lines changed

1 file changed

+3
-57
lines changed

FLUKES.md

Lines changed: 3 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -2,60 +2,6 @@
22

33
The following issues could be legit or just things I don't know (yet) how to do or fix, bear with me ;)
44

5-
1. Local running of lambdas is still a moving target with SAM CLI?: https://github.com/awslabs/aws-lambda-rust-runtime/pull/332#issuecomment-864435051
6-
1. Although there are some PoCs and workarounds from 3rd parties: https://github.com/pepoviola/tide-lambda-listener-example
7-
1. Very slow to build and deploy a Rust Lambda (~3min `sam build` + 2min `sam deploy` on a Beta Codespaces instance) and [SAM cli is still lacking good cargo integration on the SAM tooling level](https://twitter.com/braincode/status/1371660403785142273). Ideally, from a DX standpoint, a lambda should be as easy to deploy as:
8-
```
9-
$ cargo aws deploy
10-
```
11-
Keeping the SAM-CLI `template.yml` or even more conveniently, adding a section to `Cargo.toml` that mirrors the SAM spec but the same SAM tooling runs underneath, without staying on the (Rust) way as it is now... Or similar.
12-
1. AWS's `sam local invoke -e event.json` to work properly, in progress via twitter: https://twitter.com/braincode/status/1375309688573599747
13-
1. AWS's `sam local start-api` does not seem to work either, it generates some random looking binary request that is met with a HTTP 400 code as Response:
14-
```
15-
$ sam local start-api
16-
Mounting s3Bam at http://127.0.0.1:3000/ [DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT]
17-
Mounting s3Bam at http://127.0.0.1:3000/{proxy+} [DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT]
18-
You can now browse to the above endpoints to invoke your functions. You do not need to restart/reload SAM CLI while working on your functions, changes will be reflected instantly/automatically. You only need to restart SAM CLI if you update your AWS SAM template
19-
2021-03-27 14:12:27 * Running on http://127.0.0.1:3000/ (Press CTRL+C to quit)
20-
2021-03-27 14:12:30 127.0.0.1 - - [27/Mar/2021 14:12:30] code 400, message Bad request version ("Ös;ìs\x9b`¢×\x90+Á\x97\x17>Xmá\x1a~~R;&lì\x908ý·\x91\x97\x00>\x13\x02\x13\x03\x13\x01À,À0\x00\x9f̨̩̪À+À/\x00\x9eÀ$À(\x00kÀ#À'\x00gÀ")
21-
¢×>Xmá~~R;&lì·>À,À0©Ì¨ÌªÀ+À/$À(kÀ#À'gÀ" HTTPStatus.BAD_REQUEST -Õ]å[oómÚÞE0¹]R£E+X× Ös;ìs
22-
2021-03-27 14:12:30 127.0.0.1 - - [27/Mar/2021 14:12:30] code 400, message Bad request version ("Ô\x86S\x00>\x13\x02\x13\x03\x13\x01À,À0\x00\x9f̨̩̪À+À/\x00\x9eÀ$À(\x00kÀ#À'\x00gÀ")
23-
2021-03-27 14:12:30 127.0.0.1 - - [27/Mar/2021 14:12:30] "2.Û¼/æI4Í2À¡¿â
24-
\kÁ3Á q}F a@é ½FÇÙLäÊÕåÚ°zm3?$NÖÂø ÔS>À,À0©Ì¨ÌªÀ+À/$À(kÀ#À'gÀ" HTTPStatus.BAD_REQUEST -
25-
```
26-
1. Cannot cross-compile `ring` dependency on an Apple Silicon while still being able to deploy on AWS (x86_64-unknown_linux_gnu), see error:
27-
28-
```rust
29-
% cargo build --release --target x86_64-unknown-linux-gnu
30-
(...)
31-
error: failed to run custom build command for `ring v0.16.20`
32-
33-
Caused by:
34-
process didn't exit successfully: `/Users/rvalls/dev/umccr/s3-rust-noodles-bam/target/release/build/ring-409950ed8e3b17f6/build-script-build` (exit code: 101)
35-
--- stdout
36-
OPT_LEVEL = Some("3")
37-
TARGET = Some("x86_64-unknown-linux-gnu")
38-
HOST = Some("aarch64-apple-darwin")
39-
CC_x86_64-unknown-linux-gnu = None
40-
CC_x86_64_unknown_linux_gnu = None
41-
TARGET_CC = None
42-
CC = None
43-
CROSS_COMPILE = None
44-
CFLAGS_x86_64-unknown-linux-gnu = None
45-
CFLAGS_x86_64_unknown_linux_gnu = None
46-
TARGET_CFLAGS = None
47-
CFLAGS = None
48-
CRATE_CC_NO_DEFAULTS = None
49-
DEBUG = Some("false")
50-
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
51-
52-
--- stderr
53-
running "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/Users/rvalls/dev/umccr/s3-rust-noodles-bam/target/x86_64-unknown-linux-gnu/release/build/ring-7d583ca99ada65cc/out/aesni-x86_64-elf.o" "/Users/rvalls/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/ring-0.16.20/pregenerated/aesni-x86_64-elf.S"
54-
/Users/rvalls/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/aesni-x86_64-elf.S:1181:19: error: unexpected token in '.section' directive
55-
.section .note.GNU-stack,"",@progbits
56-
^
57-
thread 'main' panicked at 'execution failed', /Users/rvalls/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/ring-0.16.20/build.rs:656:9
58-
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
59-
warning: build failed, waiting for other jobs to finish...
60-
error: build failed
61-
```
5+
1. Just support [Cargo instead of SAM template.yaml, Makefile, etc... hacks](https://github.com/aws/aws-lambda-builders/pull/174).
6+
1. AWS's `sam local invoke -e event.json` to work properly, in progress via twitter: https://twitter.com/braincode/status/1375309688573599747 ... not a problem anymore for Rust lambda runtime, `sam local start-api` works fine.
7+
1. Cannot cross-compile `ring` dependency on an Apple Silicon while still being able to deploy on AWS (x86_64-unknown_linux_gnu), see [ring issue](https://github.com/briansmith/ring/issues/1332).

0 commit comments

Comments
 (0)