aws s3 command does not work in a batch file triggered by a Windows task scheduler

后端 未结 4 1148
谎友^
谎友^ 2021-01-01 01:50

I have a batch file C:\\upload_to_s3.bat. In this file, there is a line:

aws s3 sync D:\\S3\\batch1\\ s3://MyBucket/batch1 --exclude *.bat

I have Windows tas

4条回答
  •  长发绾君心
    2021-01-01 02:31

    Include the following lines in your batch file:

    set AWS_ACCESS_KEY_ID=your_access_key_id

    set AWS_SECRET_ACCESS_KEY=your_secret_access_key

    AWS Documentation

提交回复
热议问题