Updating AWS::ApiGateway::RestAPI resources - AWS CloudFormation

Updating AWS::ApiGateway::RestAPI resources

When a generated template contains AWS::ApiGateway::RestApi resources, then warnings are generated stating that Body, BodyS3Location, and CloneFrom properties are identified as UNSUPPORTED_PROPERTIES. This is because these are optional write-only properties. The IaC generator does not know whether these properties were ever applied to the resource. The IaC generator does not include these properties in the generated template.

If you want to set the Body property for your REST API, you can update your generated template using the following steps:
  1. Use the Amazon API Gateway GetExport API action to download the API. For example, by using the aws apigateway get-export AWS CLI command. For more information, see Export a REST API from API Gateway in the API Gateway Developer Guide.

  2. Retrieve the Body property from the response of the GetExport API action. Upload it to an Amazon S3 bucket.

  3. Download the generated template.

  4. Add the BodyS3Location/Bucket and BodyS3Location/Key properties to the template, specifying the bucket name and key where the Body is stored.

  5. Open the generated template in the IaC generator console and choose Import edited template.