Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

access jira via lambda

Aashutosh Sharma
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 22, 2022

Hi,

I have written a small code to access the jira projects through python.

I am using atlassian-python-api.
the code is working perfectly fine while running from pycharm, however when i try to run the same code via AWS lambda the output of the call is redirected to login.microsoft.com.


I have even tried using requests package and calling the jira rest api via following authentication mechanisms
1. by combining the username and apitoken and then using base64 encoding of the string

2. also by using the username and apitoken directly.

In both the situations it is transfering the call to microsoft authentication and returning a html code instead of json data.

Is there something i am missing while running the code from lambda?

Code:

from atlassian import Jira
jira = Jira( url='https://jira.companyurl', token=api_token)

for p in jira.projects():
print(p['name'])

 

0 answers

Suggest an answer

Log in or Sign up to answer