- Issue #4544: Partially Resolved using the latest LocalStack docker image released on 15 Sep 2021 - Thanks to @whummer – Passed test using
./localstack.sh --use-hostname, but the event does not get dispatched when subscribing to more than one Kafka topic (seeprocessDataTopic1atserverless-event-msk.yml) - Issue #4569: Partially Resolved using the latest LocalStack docker image released on 15 Sep 2021 - Thanks to @whummer - LocalStack now translates
--self-managed-event-sourceby Serverless properly, but the event itself does not get dispatched when producing a message to Kafka Broker - Issue #4550: Pending
- Issue #4626: Resolved using the latest LocalStack docker image released on 22 Sep 2021 - Thanks to @whummer – Passed test using
./socket.sh - Issue #4606: Resolved using the latest LocalStack docker image released on 11 Oct 2021 - Thanks to @whummer – Passed test using
../localstack.sh --use-hostname - Issue #4893
- Issue #4970: Resolved by adding
LAMBDA_CONTAINER_REGISTRY=mlupin/docker-lambdawhere it supportsarm64(suggested by @naspeh in Slack Community Support channel).
- Bash v3+
- Curl v7+
- AWS CLI v2+
- Serverless v2+
- Node.js v12+
- WSCAT 5+
- Create
.envwith your LocalStack API Key:LOCALSTACK_LICENSE=API_KEY - Point
localhost.localstack.cloudto127.0.0.1at your/etc/hosts
- Modify
REGIONvariable near the top ofsocket.shto match your AWS default profile - Run:
./socket.sh- To force creating a fresh container:
./socket.sh --recreate
- To force creating a fresh container:
- Once connected to WebSocket, enter test message:
{"action": "\$default", "data": {"test":"ok"}} - After receiving a successful response:
{"message":"ok"}, close socket conenction to continue the test case:Ctrl+C - Observe LocalStack tailed logs around
KeyError,InvocationException,NoSuchKey, orUnable to fetch CF custom resource result from s3!docker container logs --follow test-localstack
- Modify
REGIONvariable near the top oflocalstack.shto match your AWS default profile - Run:
./localstack.sh(detault test uses MSK)- To test self-managed Kafka:
./localstack.sh --use-kafka - To force creating a fresh container:
./localstack.sh --recreate
- To test self-managed Kafka:
- Observe LocalStack tailed logs around
ECONNREFUSED,KafkaJSConnectionClosedError,EventSourceArn,[BrokerPool] Closed connection, orThere is no leader for this topic-partition as we are in the middle of a leadership election!docker container logs --follow test-localstack - Review comments in teh above script, as well as the generated files:
cluster-info.jsonlocalstack.logmsk.txt
- Connection to Kafka happens around line 26 at
lambda-http/ContentHelper.js - For testing
ZookeeperConnectStringinstead:./localstack.sh --use-msk --use-zookeeper