1 Answer
- Newest
- Most votes
- Most comments
2
Please refer to the documentation. You can specify a profile (either from the shared credentials file or from a custom file) by using the CredentialProfileStoreChain
class and obtaining an AWSCredentials
object:
var storeChain = new CredentialProfileStoreChain(); if (storeChain.TryGetAWSCredentials("some_profile", out var awsCredentials)) { // Use awsCredentials to create an Amazon S3 service client using var client = new AmazonS3Client(awsCredentials); }
answered 2 years ago
Relevant content
- asked 5 years ago
- asked a year ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 19 days ago
Thank you, Dmitry. That worked. Regards
I'm glad my answer was helpful! You can also mark it as 'accepted'.