# AWS Lambda (Golang in docker) running slower than Python service

**URL:** <https://forum.serverless.com/t/aws-lambda-golang-in-docker-running-slower-than-python-service/19448>\
**Category:** Serverless Framework\
**Tags:** aws, lambda\
**Created:** [August 29, 2023, 10:36am UTC](https://forum.serverless.com/t/aws-lambda-golang-in-docker-running-slower-than-python-service/19448 "2023-08-29T10:36:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![georgelza](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/georgelza/32/7537_2.png) [@georgelza](https://forum.serverless.com/u/georgelza)\
**Post date:** [August 29, 2023, 10:36am UTC](https://forum.serverless.com/t/aws-lambda-golang-in-docker-running-slower-than-python-service/19448/1 "2023-08-29T10:36:39Z")

</div>

Hi hi all

I wrote a Python function that consumes a gzip’d file from S3, and posts the lines/records onto a confluent Kafka topic, it runs at just over 8000 records/lines per second.

I then duplicated the functionality in Golang… had to build the golang version into a docker container to get it to work due to the usage of c modules by the confluent modules.

strange thing, it only runs at 5128 constantly/second…

same lambda memory allocation.

Any chance anyone is willing to take a peak and make suggestions how to get the golang faster… I expected it faster, actually allot…

> **[GitHub - georgelza/GoLambdaLoader](https://github.com/georgelza/GoLambdaLoader)**
>
> Contribute to georgelza/GoLambdaLoader development by creating an account on GitHub.

G
