Skip to content

Debugging locally on a different invocation endpoint #320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jsonfry opened this issue Mar 19, 2024 · 3 comments
Closed

Debugging locally on a different invocation endpoint #320

jsonfry opened this issue Mar 19, 2024 · 3 comments

Comments

@jsonfry
Copy link
Contributor

jsonfry commented Mar 19, 2024

Expected behavior

When debugging locally, you have to send POST requests to /invoke.

I'm trying to use another lambda local tool that is expecting the invoke url to be /2015-03-31/functions/function/invocations, as per the "runtime interface emulator" described here https://docs.aws.amazon.com/lambda/latest/dg/images-test.html

Actual behavior

As this runtime runs it locally on /invoke this of course does not work, and is not changeable

Steps to reproduce

n/a

If possible, minimal yet complete reproducer code (or URL to code)

No response

What version of this project (swift-aws-lambda-runtime) are you using?

1.0.0-alpha.2

Swift version

swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: arm64-apple-macosx14.0
Darwin *** 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000 arm64

Amazon Linux 2 docker image version

No response

@jsonfry
Copy link
Contributor Author

jsonfry commented Mar 19, 2024

Would it be possible to have an environment variable that is picked up that allows the local server to use a different path? I could submit a PR for this.

@jsonfry
Copy link
Contributor Author

jsonfry commented Mar 19, 2024

I've been trying to see if the aws lambda client (which https://docs.aws.amazon.com/lambda/latest/dg/images-test.html is using) can be asked to use a completely different invoke endpoint, but the 2015-03-31/functions/*/invocations part is baked in.

@sebsto
Copy link
Contributor

sebsto commented May 22, 2024

Merged into main
#321

@sebsto sebsto closed this as completed May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants