dynamodb aws code example
Example 1: aws local endpoint dynamodb
aws dynamodb list-tables --endpoint-url http://localhost:8000
Example 2: dynamodb s3 link
var context = new DynamoDBContext();
Book myBook = new Book
{
Id = 501,
CoverImage = S3Link.Create(context, "myBucketName", "covers/AWSSDK.jpg", Amazon.RegionEndpoint.USWest2),
Title = "AWS SDK for .NET Object Persistence Model Handling Arbitrary Data",
ISBN = 999,
BookAuthors = new List { "Jim", "Steve", "Pavel", "Norm", "Milind" }
};
context.Save(myBook);
myBook.CoverImage.UploadFrom("path/to/covers/AWSSDK.jpg");
string coverURL = myBook.CoverImage.GetPreSignedURL(DateTime.Now.AddHours(5));
myBook = context.Load(501);
myBook.CoverImage.DownloadTo("path/to/save/cover/otherbook.jpg");