# Help wit Serverless CI/CD Github Actions or Bitbucket Pipelines

**URL:** <https://forum.serverless.com/t/help-wit-serverless-ci-cd-github-actions-or-bitbucket-pipelines/9944>\
**Category:** Serverless Framework\
**Tags:** lambda\
**Created:** [November 24, 2019, 9:50pm UTC](https://forum.serverless.com/t/help-wit-serverless-ci-cd-github-actions-or-bitbucket-pipelines/9944 "2019-11-24T21:50:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akiren](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/akiren/32/3794_2.png) [@Akiren](https://forum.serverless.com/u/Akiren)\
**Post date:** [November 24, 2019, 9:50pm UTC](https://forum.serverless.com/t/help-wit-serverless-ci-cd-github-actions-or-bitbucket-pipelines/9944/1 "2019-11-24T21:50:29Z")

</div>

Hello there!

After about 10 hours I am quite desperate lol…

Does anyone have a simple example of CI / CD with Python, AWS Lambda, Serverless and either Github Actions or Bitbucket pipelines…

I want to simply check into git and have serverless deploy to lambda… I havent found a single example that works…

When serverless runs using either CI/CD option both Implementations return  
Error: ENOENT: no such file or directory, open ‘/opt/atlassian/pipelines/agent/build/venv/.Python’

Error: ENOENT: no such file or directory, open ‘/github/workspace/venv/.Python’

Here is my Github workflow YML  
on:  
push:  
branches:  
- release  
name: Deploy to AWS Prod  
jobs:  
deploy:  
name: deploy  
runs-on: ubuntu-latest  
steps:  
- uses: actions/checkout@master  
- name: npm install  
uses: actions/npm@master  
with:  
args: install  
- name: serverless deploy  
uses: mirrorhanyu/serverless-github-action-python@master  
with:  
args: deploy  
env:  
AWS\_ACCESS\_KEY\_ID: ‘ID’  
AWS\_SECRET\_ACCESS\_KEY: ‘SECRET’

Here is my Bitbucket Pipelines

image: nikolaik/python-nodejs:python3.7-nodejs12

pipelines:  
branches:  
release:  
- step:  
script:  
- pip install --upgrade setuptools  
- pip3 install virtualenv  
- source venv/bin/activate  
- pip install -r requirements.txt  
- npm install -g serverless  
- python3 --version  
- serverless config credentials --stage prod --provider aws --key {AWS\_DEV\_LAMBDA\_KEY} --secret {AWS\_DEV\_LAMBDA\_SECRET}  
- ls -la  
- pwd  
- serverless deploy --stage prod

With the Pipelines example I can verify with ls -la, PWD and cd venv that the file .Python does indeed exist… It seems serverless cannot see it…

Anyways any help would be appreciated, many brain cells, hours and checkins have been burned.

[https://dev.to/ayushsharma/automating-serverless-framework-deployments-using-bitbucket-pipelines-mfa](https://dev.to/ayushsharma/automating-serverless-framework-deployments-using-bitbucket-pipelines-mfa)

That example followed verbatim also fails with the same error.

Lastly this is my Serverless file  
service: automata

provider:  
name: aws  
runtime: python3.7  
timeout: 30

functions:  
processor:  
handler: handler.hello  
events:  
- schedule: rate(5 minutes)

package:  
exclude:  
- .gitignore  
- .vscode  
- bitbucket-pipelines.yml  
- README.md  
- serverless.yml

---

<div class="post-metadata">

**Author:** ![RichStone](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/richstone/32/3769_2.png) [@RichStone](https://forum.serverless.com/u/RichStone)\
**Post date:** [December 2, 2019, 1:02pm UTC](https://forum.serverless.com/t/help-wit-serverless-ci-cd-github-actions-or-bitbucket-pipelines/9944/2 "2019-12-02T13:02:55Z")

</div>

Hey @Akiren,

I’ve run into the NOENT issue with NPM and bitbucket pipelines with the simple setup described by the tutorial of Ayush Sharma that you linked to. But it happened only the very first time and after that worked seamlessly.

---

<div class="post-metadata">

**Author:** ![Akiren](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/akiren/32/3794_2.png) [@Akiren](https://forum.serverless.com/u/Akiren)\
**Post date:** [December 9, 2019, 5:30pm UTC](https://forum.serverless.com/t/help-wit-serverless-ci-cd-github-actions-or-bitbucket-pipelines/9944/3 "2019-12-09T17:30:13Z")

</div>

Wow, and you just redeployed and it worked? I have deployed over 100 times to no avail… you should see my bitbucket logs lol. Thanks for the response

---

<div class="post-metadata">

**Author:** ![lintaonz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/lintaonz/32/3815_2.png) [@lintaonz](https://forum.serverless.com/u/lintaonz)\
**Post date:** [December 9, 2019, 7:39pm UTC](https://forum.serverless.com/t/help-wit-serverless-ci-cd-github-actions-or-bitbucket-pipelines/9944/4 "2019-12-09T19:39:16Z")

</div>

From the error you got:

```
Error: ENOENT: no such file or directory, open ‘/opt/atlassian/pipelines/agent/build/venv/.Python’
Error: ENOENT: no such file or directory, open ‘/github/workspace/venv/.Python’

```

It seems your python didn’t install in the right directory. Could you use the [official example](https://confluence.atlassian.com/bitbucket/python-with-bitbucket-pipelines-873891271.html) and see what happen. You can always run a shell command in the pipelines and verify your file locations.

---

<div class="post-metadata">

**Author:** ![clarkritchie](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/clarkritchie/32/4403_2.png) [@clarkritchie](https://forum.serverless.com/u/clarkritchie)\
**Post date:** [July 14, 2020, 4:12pm UTC](https://forum.serverless.com/t/help-wit-serverless-ci-cd-github-actions-or-bitbucket-pipelines/9944/5 "2020-07-14T16:12:40Z")

</div>

Akiren, Did you get anywhere with this for GHA? Curious if you have a working template to share. 🙇‍♂️

---

<div class="post-metadata">

**Author:** ![sidra](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@sidra](https://forum.serverless.com/u/sidra)\
**Post date:** [November 9, 2020, 5:16pm UTC](https://forum.serverless.com/t/help-wit-serverless-ci-cd-github-actions-or-bitbucket-pipelines/9944/6 "2020-11-09T17:16:43Z")

</div>

Hi  
I am trying to setup a bitbucket pipeline saving AWS credentials as bitbucket variable but it’s not locating it.  
Getting this error  
4s

`+ serverless config credentials --provider aws --key ${AWS_DEV_LAMBDA_KEY} --secret ${AWS_DEV_LAMBDA_SECRET}`

`(node:87) ExperimentalWarning: The dns.promises API is experimental`

`(node:87) ExperimentalWarning: The fs.promises API is experimental`

` `

` Serverless Error ---------------------------------------`

` `

` AWS provider credentials not found. Learn how to set up AWS provider credentials in our docs here: <http://slss.io/aws-creds-setup>.`

` `

` Get Support --------------------------------------------`

` Docs: docs.serverless.com`

` Bugs: github.com/serverless/serverless/issues`

` Issues: forum.serverless.com`

` `

` Your Environment Information ---------------------------`

` Operating System: linux`

` Node Version: 11.13.0`

` Framework Version: 2.11.1`

` Plugin Version: 4.1.2`

` SDK Version: 2.3.2`

` Components Version: 3.3.0`
