Amazon S3 Upload Error

(Scott Brown) #1

I am trying to use the Amazon S3 Upload step to push files up to S3 and I am getting the following error:
Write-S3Object : Cannot convert ‘System.String’ to the type ‘System.Management.Automation.SwitchParameter’ required by parameter ‘Recurse’.

I am not adding any scripts or any code to the step just setting the default values. I have verified that the Source Folder exists out on the server. Anyone have any idea what could be causing this issue?

Let me know if I can provide any additional information.

Thank you,
Scott Brown

(Michael Noonan) #2

Hi Scott,

Thanks for getting in touch! My best guess at the moment is you are using the Amazon S3 Upload step from the community library which calls Write-S3Object here. It looks like this step template was built to target a version of the Write-S3Object cmdlet which accepted a bool argument for Recurse, but the version of the cmdlet on your server requires an enum value.

We now have built-in support for uploading things to S3 buckets which is more flexible. I would recommend switching over to use that instead if possible. We kept the community provided step template so people could keep using that if they preferred.

If you are still having trouble after switching over, can you confirm which version of Octopus Server you are using when this happens?

Also can you grab two things and send those through to support@octopus.com with a link to this post so we can investigate further, then report back on the thread?

  1. The raw task log for this failing deployment: https://octopus.com/docs/support/get-the-raw-output-from-a-task
  2. The JSON export of the deployment process (or just that step). You can do this within the Octopus UI itself.

Hope that helps!
Mike

1 Like
(Scott Brown) #4

I have sent the requested information over to the support@octopus.com email. Let me know if there is anything else that I can provide. Thank you !