I'm retrieving an aws parameter store value using aws ssm command. I get the result back. I need to store this value in a shell variable so that I can use it later on.
This on Mac terminal. I am invoking through AWS CLI to get the aws parameters I get the values from aws however I can't set it to a shell variable due to my lack of knowledge of using Shell
export PASS=echo "$(aws ssm get-parameters --names "/enterprise/org/dev/spring.datasource.password" --with-decryption --query "Parameters[0].Value" | tr -d '"')"
echo $PASS
When I do echo $PASS I expect to see the value of the parameter however I don't get anything. I am sure that the value exist because if I don't export and just run $ aws ssm get-parameters. I see the result.