'is it possible to run CLI(command line interface) commands through C# code

Upload file to Bucket

syn: aws s3 cp [FilePath\FileName] s3://[BucketName]

am excecuted above command by cmd for upload file to S3 Bucket. now i need how to upload file to s3 bucket using c# code. is it possible.?

thanks in advance.



Solution 1:[1]

AWS offers SDK for C#, which you must ideally use for such things. Even though you could do what you're asking for using CLI within C#, your work becomes un-necessary complex. You can check this answer for how to run commands within C#.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1