Replies: 4 comments
|
I've no experience in trying but I highly doubt that it's possible yet. |
0 replies
|
@spirrello Api Gateway is the router in that scenario, don't think api gateway has a rust runtime |
0 replies
This comment was marked as spam.
This comment was marked as spam.
|
Thx for the matchit suggestion. I'll take a look at that.
…On Fri, Jul 17, 2026 at 4:59 AM Sami El Akkad ***@***.***> wrote:
Using the full Actix Web server inside AWS Lambda/API Gateway is not the
natural fit because Lambda does not give Actix a normal long-running socket
listener. API Gateway receives the HTTP request and invokes your Lambda
handler.
The usual Rust Lambda shape is:
API Gateway event -> Lambda runtime handler -> your routing logic -> Lambda response
If you want Actix-like routing, use a framework-independent router crate
such as matchit inside the Lambda handler. Example shape:
let mut router = matchit::Router::new();
router.insert("/users/:id", Route::UserShow).unwrap();
router.insert("/health", Route::Health).unwrap();
match router.at(path) {
Ok(matched) => match matched.value {
Route::UserShow => { /* build Lambda response */ }
Route::Health => { /* build Lambda response */ }
},
Err(_) => { /* 404 */ }}
If you want a full web framework on Lambda, look for frameworks/adapters
designed around Lambda's event model rather than a socket server. Actix Web
is strongest when it owns the HTTP server process directly, for example on
ECS, EC2, Fly.io, a VM, or a container behind a load balancer.
—
Reply to this email directly, view it on GitHub
<#2841?email_source=notifications&email_token=ABWXQ5EFK3A3L6LT2HZZXS35FHTHNA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNZWG4YDQNBTUZZGKYLTN5XKO3LFNZ2GS33OUVSXMZLOOSWGM33PORSXEX3DNRUWG2Y#discussioncomment-17670843>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABWXQ5BPPOK5SLWDYV7ZRG35FHTHNAVCNFSNUABHKJSXA33TNF2G64TZHMYTANJTG44TKNRZHNCGS43DOVZXG2LPNY5TIMZRGA2DMONBOYBA>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/ABWXQ5BG5S2D3LDEX3XE5FL5FHTHNA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNZWG4YDQNBTUZZGKYLTN5XKO3LFNZ2GS33OUVSXMZLOOSVGM33PORSXEX3JN5ZQ>
and Android
<https://github.com/notifications/mobile/android/ABWXQ5DC7JN65DDZQSATXNL5FHTHNA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNZWG4YDQNBTUZZGKYLTN5XKO3LFNZ2GS33OUVSXMZLOOSXGM33PORSXEX3BNZSHE33JMQ>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I'm working on setting up an API with AWS Lambda + AWS API Gateway and would like to use the Actix HTTP router. Is this possible? If so can you provide an example?
Thank you for your help in advance.
All reactions