For this problem, you need to install aws cli on your server and make sure the Jenkins user has permissions to run it. Or simply use the Amazon AMI when creating the EC2 instance, it comes with the aws cli. Assign a role in the instance with the appropriate policy. ( it is simpler than using user key in aws configure )