-1

I am making a Cron Job in AWS Server and I have this File Handling function which creates JSON file. I already have Amazon S3 Cloud Storage, and I want my JSON file saved inside it. How can I do it? I tried to locate the directory for Amazon S3 Storage using Filezilla but found nothing. Thank you!

Imperatura
  • 133
  • 2
  • 12

1 Answers1

1

you have to put another command into your cron.

After you create a Json file, you have to use awscli to upload your json to S3 storage.

Here is how to install it.

installation guide

after its set up, you can use aws s3 command to upload it.

have a look here for more information.

S3 upload command

I guess this this a command you need to add.

aws s3 cp ./yourfile.json s3://your-bucket-name/

Natsathorn
  • 1,530
  • 1
  • 12
  • 26