Egbert Ypma

10/25/2019, 3:03 PM
Hi folks, I'm pretty new to prefect and exploring its possibilities at the moment. I am trying to upload a file to AWS but I am struggling with all the security details. Where can I find an example that uses the S3Upload task as a step in a workflow?

Chris White

10/25/2019, 3:16 PM
Hi Egbert! So for that task you currently need two things: - an
and a
which you can get from your AWS console - once you have those, put them in a dictionary like:
credentials = dict(ACCESS_KEY=my_key, SECRET_ACCESS_KEY=my_secret_key)
- this credentials dictionary now needs to be placed in `prefect.context.secrets`; you can do that directly:
prefect.context.secrets["AWS_CREDENTIALS"] = credentials
- or indirectly by JSON-serializing the dictionary and storing it under the environment variable

Egbert Ypma

10/25/2019, 4:09 PM
Thx Chris I'll have a go at it.