i am trying to automate file update on s3 using aws cli. when i manually run the code aws s3 cp /home/abc/lampdata.json s3://lamp
it is working completely fine but in shell script file it is giving me an error
#!/bin/sh
exec bash -c 'AWS_CONFIG_FILE=/root/.aws/config aws s3 cp /home/abc/lampdata.json s3://lamp' &
upload failed: ../../abc/lampdata.json to s3://lamp/lampdata.json Unable to locate credentials
though i have configured using aws configure. is this some problem with the shell script?