Questions tagged [aws-sdk-net]

Anytime you've some question/problem using AWS SDK for .NET . It's the official package to work with AWS services using .NET

AWS SDK for .NET. The SDK helps take the complexity out of coding by providing .NET APIs for AWS services including Amazon S3, Amazon EC2, Amazon DynamoDB and more. The SDK can be downloaded from NuGet or installed using the MSI package, which also includes the AWS Toolkit for Microsoft Visual Studio 2013 and 2015 editions and the AWS Tools for Windows PowerShell.

NuGet is the recommended way to install AWS SDK for .NET packages. NuGet Package Manager will install the correct assemblies for your project type - .NET 3.5, 4.5, or Portable Class Library.

Official Doc

238 questions
1
vote
1 answer

AWS SDK Configuration with Environmental Variables & Dependency Injection .NET Core

I am having trouble getting the AWS Setup Extension to process environment variables. Following instructions on the AWS Docs + Unofficial Docs. In my StartUp file, I add the following config and services. …
Craig.C
  • 561
  • 4
  • 17
1
vote
1 answer

How to mock CreateBatchWrite object in Xunit

I’m writing a unit test in c# and I need to mock the response of CreateBatchWrite using Moq but not able to instantiate an object of the BatchWrite object. I’m doing this: _dbContext.Setup(m =>…
Biswajit Maharana
  • 531
  • 1
  • 8
  • 23
1
vote
1 answer

AWS - list all buckets under organization or account using the aws sdk

Is there a way to list all the aws s3 buckets of an organization or under each of the organization accounts? I'm using the aws .net sdk and need to get all the buckets the organization has.
Amir M
  • 508
  • 1
  • 8
  • 28
1
vote
1 answer

AWS .NET SDK run ECS Task - how to select VPC?

I want to start an ECS Task with the AWS .NET SDK. But it throws the following exception: "Network Configuration must be provided when networkMode 'awsvpc' is specified." I use the AWS Fargate launch type and the code looks like this: var…
Matthias Herrmann
  • 2,650
  • 5
  • 32
  • 66
1
vote
1 answer

Load testing AWS SDK client

What is the recommended way to performance test AWS SDK clients? I'm basically just listing/describing resources and would like to see what happens when I query 10k objects. Does AWS provide some type of mock API, or do I really need to request…
Nelson Rothermel
  • 9,436
  • 8
  • 62
  • 81
1
vote
1 answer

AWS Cognito Pre-Authentication lambda trigger using .Net Core 3 - returns an 'InvalidLambdaResponse' exception

Need some help with AWS Cognito Pre-Authentication lambda trigger to be written in .Net Core 3. I am able to pass the correct attributes as part of 'validationData' attribute in the cognito request. When the validation attribute fails to satisfy the…
1
vote
0 answers

filename with special characters are not working as expected aws s3 presignedurl

i am trying to get a presigned url for a file(Royal Groups & Rosters-40052692020900-21894108859110.xlsx) string uploadObjectPath = "Royal Groups & Rosters-40052692020900-21894108859110.xlsx"; BasicAWSCredentials credentials = new…
saicharan
  • 435
  • 6
  • 18
1
vote
1 answer

High memory usage and slow upload using AWS S3 TransferUtility

I have created an application using C# and the AWS .Net SDK (v3.3.106.25) to upload some database backup files to a S3 bucket. The application is currently unusable as memory usage goes up to 100% and uploads of files take progressively longer. I…
altwood
  • 101
  • 1
  • 8
1
vote
0 answers

The stream returned from TransferUtility cannot be used to fill a bytes array

I use the TransferUtility to get a stream from a file on s3. If I CopyTo the stream to another stream, it'll copy correctly, if I ReadAsync it into a byte[], the result will be only correct up to about 16kb. (So I get different hashes in the…
Alireza
  • 5,421
  • 5
  • 34
  • 67
1
vote
0 answers

AWS .NET Core Worker Service using AWS local profile for development is trying to access IAM credentials from instance profile?

I have a .NET Core Worker service using AWS SQS to read messages off a queue. For local development I'm using a default profile with access/secret key stored in that. My appSettings.json is set up as follows: { "Logging": { "LogLevel": { …
JamesMatson
  • 2,522
  • 2
  • 37
  • 86
1
vote
0 answers

When using the DynamoDb Object Persistance Api, retrieving items with a null value for non-primary keys causes an exception to be thrown

This line https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Services/DynamoDBv2/Custom/Conversion/SchemaV1.cs#L199 causes null values to not be convertible to strings in the library. The logic seems to conflate lack of value, and the value not…
jamesbascle
  • 854
  • 1
  • 10
  • 17
1
vote
0 answers

DynamoDB .NET persistance model: retrieve only specific attributes

I have a DynamoDB table with GSI and I need to use AWS .NET SDK to retrieve two specific attributes, preferably using the persistence model. I've created a separate class for this projection like this [DynamoDBTable("MyTable")] public class…
Demarsch
  • 1,419
  • 19
  • 39
1
vote
1 answer

Table.PutItemAsync of AWSSDK.DynamoDBv2 always returns null

In .net core 2.1 application I am adding a new record into DynamoDB table using Table.PutItemAsync of AWSSDK.DynamoDBv2 (v3.3.101.18) library: var doc = await _table.PutItemAsync(document); I can see that the record is successfully added in AWS…
armache
  • 596
  • 5
  • 22
1
vote
2 answers

How do I correctly use the SendBulkTemplatedEmailRequest from SES in the AWS-SDK-NET?

I am attempting to use the AmazonSimpleEmailService client via the AWS-SDK for .Net, to send a SendBulkTempatedEmailRequest. I have implemented a dedicated handler for actually building the request and making the SendBulkTemplatedEmailAsync call. It…
trenthaynes
  • 1,668
  • 2
  • 16
  • 28
1
vote
1 answer

AWS S3 Get Object Part Metadata

I am trying to get information about Number of Parts and Part Size for an uploaded Object in S3 using .Net C# SDK. The below commandlet returns PartsCount and ContentLength (Part Size). aws s3api head-object --bucket MY_BUCKET_NAME --key…
Amanvir Mundra
  • 420
  • 1
  • 6
  • 20