I have some AWS features related test in a maven project which I would like to run with command prompt. Below is the workflow to run these test:
- I hit a powershell file to generate aws credential
- I add them in edit configuration (When run through intelij)
- I run
Same steps when I replicated with a batch file, I created batch file with following content:
powershell "D:/Users/dosqauser/awscred.ps1"
cd "D:/Users/UserName/Documents/API_Automation/api-automation/"
mvn -DargLine="AWS_PROFILE=env-fullaccess" test
This is not setting the credential as I am getting following error:
aws.doesBucketExist(bucketName), Unable to load AWS credentials from any provider in the chain.
I tried with this as well after reading some answers :
export AWS_PROFILE=env-fullaccess
mvn test
unset AWS_PROFILE
but it also didn't work.