Kod dodający wpis do DynamoDb.

	private static AmazonDynamoDBClient client = new AmazonDynamoDBClient();
	DynamoDBContext context = new DynamoDBContext(client);
	int myFileId = 1001; // Some unique value.
	MyFile myFile = new MyFile
	{
		Id = myFileId,
		Title = "Tytul ksiazki",
		Price = "0",               
	};
	context.Save(myFile);

    [DynamoDBTable("TableName")]
    public class File
    {
        [DynamoDBHashKey] //Partition key
        public int Id
        {
            get; set;
        }
        [DynamoDBProperty]
        public string Title
        {
            get; set;
        }
        [DynamoDBProperty]
        public string Price
        {
            get; set;
        }
    }


Kod dodający plik do S3.

	private const string bucketName = "*** bucket name ***";
	private const string keyName1 = "*** key name for first object created ***";
	private const string keyName2 = "*** key name for second object created ***";
	private const string filePath = @"*** file path ***";
	private static readonly RegionEndpoint bucketRegion = RegionEndpoint.EUWest1; 

	private static IAmazonS3 client = new AmazonS3Client(bucketRegion);
	var putRequest1 = new PutObjectRequest
	{
		BucketName = bucketName,
		Key = keyName1,
		ContentBody = "Przykładowy tekst"
	};
	PutObjectResponse response1 = await client.PutObjectAsync(putRequest1);
	var putRequest2 = new PutObjectRequest
	{
		BucketName = bucketName,
		Key = keyName2,
		FilePath = filePath,
		ContentType = "text/plain"
	};
	putRequest2.Metadata.Add("x-amz-meta-title", "someTitle");
	

Kod pobierający wpis z DynamoDb.

    private static AmazonDynamoDBClient client = new AmazonDynamoDBClient();
	DynamoDBContext context = new DynamoDBContext(client);
	int myFileId = 1001; // Some unique value.
	Book fileRetrieved = context.Load<Book>( myFileId);            

    [DynamoDBTable("TableName")]
    public class File
    {
        [DynamoDBHashKey] //Partition key
        public int Id
        {
            get; set;
        }
        [DynamoDBProperty]
        public string Title
        {
            get; set;
        }
        [DynamoDBProperty]
        public string Price
        {
            get; set;
        }
    }


Kod pobierający wpis z DynamoDb.

	private static AmazonDynamoDBClient client = new AmazonDynamoDBClient();
	DynamoDBContext context = new DynamoDBContext(client);
	int myFileId = 1001; // Some unique value.
	Book fileRetrieved = context.Load<Book>( myFileId);            

    [DynamoDBTable("TableName")]
    public class File
    {
        [DynamoDBHashKey] //Partition key
        public int Id
        {
            get; set;
        }
        [DynamoDBProperty]
        public string Title
        {
            get; set;
        }
        [DynamoDBProperty]
        public string Price
        {
            get; set;
        }
    }