开发者

Deploy C# client application (S3) with Amazon AWS secret key?

开发者 https://www.devze.com 2023-02-12 14:09 出处:网络
I\'ve written my hello world AWS program today - simple file upload to a premade S3 bucket. In the context of this program deployed to a clie开发者_运维技巧nt desktop (for arguments sake), is my Secr

I've written my hello world AWS program today - simple file upload to a premade S3 bucket.

In the context of this program deployed to a clie开发者_运维技巧nt desktop (for arguments sake), is my Secret Access Key safe?

using (AmazonS3Client a = new AmazonS3Client("MyAccessKey", "MySecretAccessKey")) {

            foreach (ListViewItem lvi in listView1.Items)
            {
                TransferUtilityUploadRequest tr = new TransferUtilityUploadRequest()
                .WithBucketName("test_mydomain_com")
                .WithFilePath(((FileInfo)lvi.Tag).FullName)
                .WithTimeout(5 * 60 * 1000);
                TransferUtility tu = new TransferUtility(a);

                tu.Upload(tr);

                MessageBox.Show("Win!");
            }


        }


In short, no - not really. See this question Storing My Amazon Credentials in C# Desktop App which expands on why and what you can do about it.

0

精彩评论

暂无评论...
验证码 换一张
取 消