I am running my large scale Julia computations using an Amazon EC2 instance. I would like to save the state of computations (Julia object) as well the final results (DataFrame) to an S3 bucket.
Suppose my data structure is:
struct SampleData
a::Int
b::String
end
and I have an object:
d = SampleData(1,"sss")
I have already followed the tutorial by Amazon https://aws.amazon.com/premiumsupport/knowledge-center/ec2-instance-access-s3-bucket/ and have created an IAM role with a appropriate access rights to S3 and this role is already attached to my EC2 instance.
What I now need to do to save the d object from Julia directly to S3?
On the other hand my computation results are a DataFrame. Suppose my data frame looks as follows:
using DataFrames, CSV
df = DataFrame(a=1:3,b='a':'c',c=1.5:1:3.5)
What is the good way to write it directly to S3?