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,260 points
1,321 views

1 answer to this question.

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
• 58,100 points

Related Questions In AWS

0 votes
1 answer

How to update a CloudFront distribution's default root object?

Hi@akhtar, The following example updates the default root ...READ MORE

answered Nov 3, 2020 in AWS by MD
• 95,460 points
1,687 views
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
• 58,100 points
843 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
• 4,170 points
1,137 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
+2 votes
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
• 58,100 points
12,838 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
• 58,100 points
2,096 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP