Profile option on AmazonS3Client
0
The .NET client for AmazonS3Client has an option to pass 'Region' via its constructor. But I did not see an option for providing 'profile'. Is there a way of specifying profile?
Topics
Tags
asked 16 days ago6 views
1 Answers
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 16 days ago
I'm glad my answer was helpful! You can also mark it as 'accepted'.
Relevant questions
Is there an option in 'My Files' for a user to delete files?
asked 3 years agoLambda .net 5 container not an option in aws toolkit blueprints
asked 3 months agoHow to pass response from an HTML Select form to MTURK output
asked 3 months agoS3 integration Oracle RDS adding option to existing option group
Accepted Answerasked 3 years agoIs there an option in AWS Glue DataBrew to keep only the required columns and delete the rest?
Accepted Answerasked a year agoGlue studio has no option to edit existing job visually
asked 13 days agoIs there an option to create an EFS from an EBS snapshot?
Accepted Answerasked 3 months agoProfile option on AmazonS3Client
asked 16 days agoDid the definition of the CacheSubnets option change?
Accepted Answerasked 2 years agoIs there an option to persist MQTT offline messages to disk?
Accepted Answerasked 2 years ago
Thank you, Dmitry. That worked. Regards