public override void Configure(Container container) { //RockstarsService is powered by PocoDynamo and DynamoDB container.Register <IPocoDynamo>(c => new PocoDynamo(AwsConfig.CreateAmazonDynamoDb())); //Add S3 Bucket as lowest priority Virtual Path Provider //All Razor Views, Markdown Content, imgs, js, css, etc are being served from an S3 Bucket var s3Client = new AmazonS3Client(AwsConfig.AwsAccessKey, AwsConfig.AwsSecretKey, RegionEndpoint.USEast1); VirtualFiles = new S3VirtualPathProvider(s3Client, AwsConfig.S3BucketName, this); //Register and Create Missing DynamoDB Tables var db = container.Resolve <IPocoDynamo>(); db.RegisterTable <Rockstar>(); db.InitSchema(); //Insert Rockstar POCOs in DynamoDB db.PutItems(RockstarsService.SeedData); Plugins.Add(new RazorFormat()); //Uncomment to check LastModified in S3 for changes and recompile Razor + Markdown pages if needed //GetPlugin<MarkdownFormat>().CheckLastModifiedForChanges = true; //Plugins.Add(new RazorFormat { CheckLastModifiedForChanges = true }); }
public ImportIntoS3Tasks() { appHost = new BasicAppHost().Init(); var s3Client = new AmazonS3Client(AwsConfig.AwsAccessKey, AwsConfig.AwsSecretKey, RegionEndpoint.USEast1); s3 = new S3VirtualPathProvider(s3Client, AwsConfig.S3BucketName, appHost); }
private static IVirtualPathProvider GetProvider() { var provider = new S3VirtualPathProvider( TestVariables.AmazonS3.AccessKeyId, TestVariables.AmazonS3.SecretAccessKey, TestVariables.AmazonS3.Bucket); return(provider); }