How to Update Default Root Object of Cloud front Distribution in C#

0 votes
I have a simple C# windows forms app that takes input from user and stores it in a DB.

What I am trying to accomplish is modify the Default Root Object of one of my Cloud front Distributions.

I can't find any related articles that describes how this is accomplished.

Please help
Oct 29, 2018 in AWS by findingbugs
• 3,140 points
18 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

You will need AWS's new modularized assemblies. 

AWSSKD.Core v3 & AWSSDK.Cloudfront will do the work.

First you need to get the current Distribution mostly for validation you'll need to grab the Etag and Caller Reference. Etag to var and Caller Reference to string.

    var client2 = new AmazonCloudFrontClient();
            var tag = client2.GetDistributionConfig(new GetDistributionConfigRequest
            {
                Id = "YOURDISTID"
            }).ETag;

            string cf = client2.GetDistributionConfig(new GetDistributionConfigRequest
            {
                Id = "YOURDISTID"
            }).DistributionConfig.CallerReference;
            client2.Dispose();

Next you will need to make a update to the distribution. What I have below is the minimally required to update a distribution (Pretty much Everything you see in the AWS console when editing a distribution.

answered Oct 29, 2018 by Priyaj
• 56,100 points

Related Questions In AWS

0 votes
1 answer

How to have a server 2012 in cloud and my users in different location

You will access the server the same ...READ MORE

answered Sep 25, 2018 in AWS by Priyaj
• 56,100 points
21 views
0 votes
1 answer

How to upload an object into Amazon S3 in Lambda?

I suspect you are calling the context.done() function before s3.upload() has ...READ MORE

answered Sep 27, 2018 in AWS by Archana
• 3,770 points
22 views
0 votes
1 answer

How to fetch a list of items (like a SQL IN clause)

You can use this as this worked ...READ MORE

answered Oct 26, 2018 in AWS by Priyaj
• 56,100 points
185 views
0 votes
1 answer
0 votes
1 answer
+1 vote
1 answer

How to combine multiple S3 objects in the target S3 object w/o leaving S3

"However sometimes our raw objects are not ...READ MORE

answered Aug 28, 2018 in AWS by Priyaj
• 56,100 points
966 views
0 votes
1 answer

In Amazon Data Pipeline, how to make sure only once instance of a pipeline is running at any time?

On the CopyTablesActivity, you could set a lateAfterTimeout attribute ...READ MORE

answered Sep 19, 2018 in AWS by Priyaj
• 56,100 points
134 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.