Programmatically get your AWS Account ID with .NET
Want to learn more about AWS Lambda and .NET? Check out my A Cloud Guru course on ASP.NET Web API and Lambda.
Here is a quick way to get your AWS Account ID with .NET
First, add the
AWSSDK.SecurityToken package to your project.
Then it’s just a few lines of code -
AmazonSecurityTokenServiceClient client = new AmazonSecurityTokenServiceClient();
var response = await client.GetCallerIdentityAsync(new Amazon.SecurityToken.Model.GetCallerIdentityRequest());
Hope this saves someone a few hours!
- Using Step Functions to Orchestrate a Series of Lambda Functions
- Triggering a .NET Lambda Function from an Amazon SQS Queue
- Transcribing Two Speakers with Amazon Transcribe via Speaker Identification with .NET
- Lambda cold starts for .NET applications are not so bad
- Transcribing Two Speakers with Amazon Transcribe via Channel Identification