I am trying to remove the 1st line of a CSV file which is in S3 bucket. I am using the below, but I am getting "sed: no input files" and is creating empty file in the test directory.
aws s3 cp s3://my-bucket/rough/test.csv -| sed -i '1d' | aws s3 cp - s3://my-bucket/test/final.csv