Run a aws command using Jenkins

amazon-web-servicesJenkins

I set up a Jenkins job to run an aws command. When I execute the build, it fails and the error message is:

+ /usr/local/aws/bin/aws elasticbeanstalk describe-environments
/tmp/hudson3332739386589747399.sh: 2: /tmp/hudson3332739386589747399.sh: /usr/local/aws/bin/aws: not found 
Build step 'Execute shell' marked build as failure

I don't know what I'm doing wrong. Any ideas how to fix it?

Best Answer

Be sure to have appropriate permissions for Jenkins to access your AWS Account in your IAM role or permission set that it assumes.