Closed PhillypHenning closed 1 year ago
From the message here the issue to me looks like that the script continues its work, even if the child bash script reported an issue with the credentials:
Running Cloudformation Deploy Stack
Checking if stack exists ...
STACK_EXISTS_OUTPUT Unable to locate credentials. You can configure credentials by running "aws configure".
# NOTE: ^^ it should `exit 1` here
Stack does not exist, creating ...
...
Finished cloudfromation action create-stack successfully !!!
The check for existence of AWS credentials in https://github.com/bitops-plugins/cloudformation/pull/11 is nice, but what if the credentials provided are invalid? We'll get the same results and the problem would be fixed only partially.
The root cause might be that we're missing bubbling up the original exit code in the script.
It should fail from running aws
.
There needs to be a check made that verifies that the plugin has all appropriate parts including an AWS profile.
The below error results from having empty AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables. A more meaningful message would be helpful.