I have a awscli command to upload content to s3 bucket. I need to run this command on a ruby script. The command works when executed in terminal. I tried using several methods like backticks and Kernel#system.
value = `aws s3 cp #{published_files} s3://example_bucket/#{meeting_id} --recursive --region us-west-2`
But none of them seem to execute the task. Can anyone suggest any way? It would be of great help
Kernel#systemshould work. Try these debug steps: execute the command inirb, try simple aws commands without parameters likeaws s3api list-buckets, print the aws command with inserted parameters and verify they are correct.