# Creating AWS lambda package with sls package

**URL:** <https://forum.serverless.com/t/creating-aws-lambda-package-with-sls-package/15477>\
**Category:** Serverless Framework\
**Tags:** aws, lambda\
**Created:** [July 2, 2021, 8:02pm UTC](https://forum.serverless.com/t/creating-aws-lambda-package-with-sls-package/15477 "2021-07-02T20:02:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dipti](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@dipti](https://forum.serverless.com/u/dipti)\
**Post date:** [July 2, 2021, 8:02pm UTC](https://forum.serverless.com/t/creating-aws-lambda-package-with-sls-package/15477/1 "2021-07-02T20:02:23Z")

</div>

I am trying to execute sls commands from GITLAB CI,

image: alpine  
commands -

- npm install -g serverless
- npm install
- sls package

serverless.yml -  
plugins:

- serverless-python-requirements  
custom:  
pythonRequirements:  
dockerizePip: non-linux  
pythonBin: python

sls package command throws error for which need to do this -  
apk add gcc musl-dev python3-dev libffi-dev openssl-dev

zip file is created but when Deployed, lambda is throwing error - ImportError: libc.musl-x86\_64.so.1: cannot open shared object file: No such file or directory  
If I locally run sls package command and upload zip file to lambda, it works fine

Tried doing this - ln /usr/lib/libc.so /usr/lib/libc.musl-x86\_64.so.1 , did not help.

---

<div class="post-metadata">

**Author:** ![beenmeckel](https://avatars.discourse-cdn.com/v4/letter/b/8dc957/32.png) [@beenmeckel](https://forum.serverless.com/u/beenmeckel)\
**Post date:** [September 19, 2021, 10:53pm UTC](https://forum.serverless.com/t/creating-aws-lambda-package-with-sls-package/15477/2 "2021-09-19T22:53:58Z")

</div>

So I wrote a GitHub Python package that I want to use in my AWS lambda function. The way I’ve been able to do this now is to directly upload the package folder in the file directory of the AWS [Speed Test](https://testmyspeed.onl/) Lambda function so it can be imported.
