- 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 (seeprocessDataTopic1
atserverless-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-source
by 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-lambda
where 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
.env
with your LocalStack API Key:LOCALSTACK_LICENSE=API_KEY
- Point
localhost.localstack.cloud
to127.0.0.1
at your/etc/hosts
- Modify
REGION
variable near the top ofsocket.sh
to 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
REGION
variable near the top oflocalstack.sh
to 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.json
localstack.log
msk.txt
- Connection to Kafka happens around line 26 at
lambda-http/ContentHelper.js
- For testing
ZookeeperConnectString
instead:./localstack.sh --use-msk --use-zookeeper