1
我在使用powershell Write-S3Object命令從aws實例上傳文件時遇到問題。我做有'c:\ work \ log_instance2.txt'文件打開句柄,因爲我有一個正在運行的Python腳本,這是日誌文件。這是Write-S3Object的預期行爲嗎?如何在python應用程序仍在運行時上傳文件?Write-S3Object:進程無法訪問文件
Write-S3Object : The process cannot access the file
'c:\work\log_instance2.txt' because it is being used by another process.
At line:1 char:1
+ Write-S3Object -BucketName 'catcfs' -File 'c:\\work\\log_instance2.txt' -Key
'Un ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
+ CategoryInfo : InvalidOperation: (Amazon.PowerShe...eS3ObjectCm
dlet:WriteS3ObjectCmdlet) [Write-S3Object], InvalidOperationException
+ FullyQualifiedErrorId : System.IO.IOException,Amazon.PowerShell.Cmdlets.
S3.WriteS3ObjectCmdlet