How to call amazon Api through Jenkins

Hi all,
I have a really simple pipeline that calls all my python script in each stage, I have a script that sends a request to AWS S3 bucket. When I run this script I can get the response but when I run my script through Jenkins it gives me an error: Error: 403 Client Error: Forbidden for url:
I am wondering if anyone knows how to fix this problem.