---
title: "PUT /2020-05-31/distribution/{Id}/config"
method: PUT
path: "/2020-05-31/distribution/{Id}/config"
---

# PUT /2020-05-31/distribution/{Id}/config

`PUT /2020-05-31/distribution/{Id}/config`

Updates the configuration for a CloudFront distribution.

The update process includes getting the current distribution configuration, updating it to make your changes, and then submitting an `UpdateDistribution` request to make the updates.

**To update a web distribution using the CloudFront API**

1.  Use `GetDistributionConfig` to get the current configuration, including the version identifier (`ETag`).
    
2.  Update the distribution configuration that was returned in the response. Note the following important requirements and restrictions:
    
    *   You must rename the `ETag` field to `IfMatch`, leaving the value unchanged. (Set the value of `IfMatch` to the value of `ETag`, then remove the `ETag` field.)
        
    *   You can't change the value of `CallerReference`.
        
3.  Submit an `UpdateDistribution` request, providing the distribution configuration. The new configuration replaces the existing configuration. The values that you specify in an `UpdateDistribution` request are not merged into your existing configuration. Make sure to include all fields: the ones that you modified and also the ones that you didn't.

## Path parameters

- `Id` string, required

## Headers

- `If-Match` string

## Response `200`

Success

## Other responses

- `480` — AccessDenied
- `481` — CNAMEAlreadyExists
- `482` — IllegalUpdate
- `483` — InvalidIfMatchVersion
- `484` — MissingBody
- `485` — NoSuchDistribution
- `486` — PreconditionFailed
- `487` — TooManyDistributionCNAMEs
- `488` — InvalidDefaultRootObject
- `489` — InvalidRelativePath
- `490` — InvalidErrorCode
- `491` — InvalidResponseCode
- `492` — InvalidArgument
- `493` — InvalidOriginAccessIdentity
- `494` — InvalidOriginAccessControl
- `495` — TooManyTrustedSigners
- `496` — TrustedSignerDoesNotExist
- `497` — InvalidViewerCertificate
- `498` — InvalidMinimumProtocolVersion
- `499` — InvalidRequiredProtocol
- `500` — NoSuchOrigin
- `501` — TooManyOrigins
- `502` — TooManyOriginGroupsPerDistribution
- `503` — TooManyCacheBehaviors
- `504` — TooManyCookieNamesInWhiteList
- `505` — InvalidForwardCookies
- `506` — TooManyHeadersInForwardedValues
- `507` — InvalidHeadersForS3Origin
- `508` — InconsistentQuantities
- `509` — TooManyCertificates
- `510` — InvalidLocationCode
- `511` — InvalidGeoRestrictionParameter
- `512` — InvalidTTLOrder
- `513` — InvalidWebACLId
- `514` — TooManyOriginCustomHeaders
- `515` — TooManyQueryStringParameters
- `516` — InvalidQueryStringParameters
- `517` — TooManyDistributionsWithLambdaAssociations
- `518` — TooManyDistributionsWithSingleFunctionARN
- `519` — TooManyLambdaFunctionAssociations
- `520` — InvalidLambdaFunctionAssociation
- `521` — TooManyDistributionsWithFunctionAssociations
- `522` — TooManyFunctionAssociations
- `523` — InvalidFunctionAssociation
- `524` — InvalidOriginReadTimeout
- `525` — InvalidOriginKeepaliveTimeout
- `526` — NoSuchFieldLevelEncryptionConfig
- `527` — IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior
- `528` — TooManyDistributionsAssociatedToFieldLevelEncryptionConfig
- `529` — NoSuchCachePolicy
- `530` — TooManyDistributionsAssociatedToCachePolicy
- `531` — NoSuchResponseHeadersPolicy
- `532` — TooManyDistributionsAssociatedToResponseHeadersPolicy
- `533` — NoSuchOriginRequestPolicy
- `534` — TooManyDistributionsAssociatedToOriginRequestPolicy
- `535` — TooManyDistributionsAssociatedToKeyGroup
- `536` — TooManyKeyGroupsAssociatedToDistribution
- `537` — TrustedKeyGroupDoesNotExist
- `538` — NoSuchRealtimeLogConfig
- `539` — RealtimeLogConfigOwnerMismatch
- `540` — ContinuousDeploymentPolicyInUse
- `541` — NoSuchContinuousDeploymentPolicy
- `542` — StagingDistributionInUse
- `543` — IllegalOriginAccessConfiguration
- `544` — InvalidDomainNameForOriginAccessControl

---

[API](https://skmtc.net/aws/apis/cloudfront.md) · [All operations](https://skmtc.net/aws/apis/cloudfront/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/cloudfront/versions/fd674fc97471/schema)
