You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am operating Localstack Pro and deploy an OpenSearch instance and some Lambdas locally via Cloudformation.
Works great, but I cannot seem to connect to OpenSearch from within my Lambdas.
I studied localstack/localstack#5723 but cannot get the hang of it.
I feel like I tried everything under the sun.
I will share my setup and attempts below.
No idea what more to try.
I would appreciate help very much.
Thank you.
I map random host-ports to localstack, for simplicity let's assume 4566
OpenSearch is reachable from Host via http://localhost:4566/test-domain
I start Localstack via Rust Testcontainers
The closest attempts I got were able to reach Localstack from within the Lambda but die off with S3-Key not found exception: l.aws.handlers.logging : exception during call chain: Unable to find operation for request to service es: POST /test-domain/shops/_search
Attempts to reach OpenSearch from within Lambda
http://host.docker.internal:4566/test-domain via "LAMBDA_DOCKER_FLAGS=--add-host=host.docker.internal:host-gateway"
http://172.17.0.2:4566/test-domain where 172.17.0.2 was resolved from LOCALSTACK_HOST
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello.
I am operating Localstack Pro and deploy an OpenSearch instance and some Lambdas locally via Cloudformation.
Works great, but I cannot seem to connect to OpenSearch from within my Lambdas.
I studied localstack/localstack#5723 but cannot get the hang of it.
I feel like I tried everything under the sun.
I will share my setup and attempts below.
No idea what more to try.
I would appreciate help very much.
Thank you.
Cloudformation Snippet
Notes
4566http://localhost:4566/test-domainl.aws.handlers.logging : exception during call chain: Unable to find operation for request to service es: POST /test-domain/shops/_searchAttempts to reach OpenSearch from within Lambda
http://host.docker.internal:4566/test-domainvia"LAMBDA_DOCKER_FLAGS=--add-host=host.docker.internal:host-gateway"http://172.17.0.2:4566/test-domainwhere172.17.0.2was resolved fromLOCALSTACK_HOSThttp://localhost.localstack.cloud:4566/eu-central-1/opensearch/test-domainaligned with Unable to Connect to localstack's OpenSearch with the Endpoint provided localstack#5723 (comment)http://test-domain.eu-central-1.es.localstack.cloud:4566http://test-domain.eu-central-1.opensearch.localstack.cloud:45669200insteadBeta Was this translation helpful? Give feedback.
All reactions