I am able to connect to the S3 bucket using the GUI. When I try to connect using a Windows batch script, I get
"Access Denied" error message.
I have attached the Log file for your reference. The batch script is as follows:
:: This script takes care of sending the daily dispute file to Feedzai.
echo on
echo %date% %time%
SET JOB=$RB0140F
set cc=%date:~0,3%
set dd=%date:~7,2%
set mm=%date:~4,2%
set yy=%date:~10,4%
set hh=%time:~0,2%
set mi=%time:~3,2%
set ss=%time:~6,2%
"C:\Program Files (x86)\WinSCP\WinSCP.exe" ^
/log="C:\EDUSER\PROJECTS\CASSMSTR\OUTBOUND\FEEDZAI\LOGS\WinSCP_%dd%.log" /ini=nul ^
/command ^
"open s3://AWS Access Key:AWS Secret Key@s3.amazonaws.com/feedzai-qa-chv-batch-processor-qa-us-east-1/input/ -rawsettings PingType=1" ^
"lcd C:\EDUSER\PROJECTS\CASSMSTR" ^
"cd /feedzai-qa-chv-batch-processor-qa-us-east-1/input" ^
"put Hello.txt" ^
"exit"
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)
exit /b %WINSCP_RESULT%
Thanks,
Venkitachalam Subramanian