API Gateway CloudFormation

0

I have imported a CloudFormation JSON file representing a REST API Gateway.

{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Resources": {
        "EPaPPRestAPI": {
            "DeletionPolicy": "Retain",
            "Type": "AWS::ApiGateway::RestApi",
            "Properties": {
                "BodyS3Location": {
                    "Bucket": "epapp-data",
                    "Key": "authors.json"
                },
                "Description": "REST API for serving JSON data to EPaPP Flutter app",
                "EndpointConfiguration": {
                    "Types": [
                        "EDGE"
                    ]
                },
                "MinimumCompressionSize": 8,
                "Name": "EPaPP Restful API",
                "Tags": [
                    {
                        "Key": "Project",
                        "Value": "EPaPP"
                    }
                ]
            }
        }
    }
}

In fact, the authors.json's size is 7MB. However, I received the below output:

Resource handler returned message: "Invalid request provided: S3 object size exceeds limit of 6 MB" (RequestToken: d80d26ea-77ff-09b4-9302-ca1f853651f2, HandlerErrorCode: InvalidRequest)

1개 답변
0

Given your authors.json exceeds the limit, try and reduce the size by preprocessing. Some ideas:

  1. Remove the whitespace from the JSON by serializing without indentation or newlines - example using JSON.stringify: JSON.stringify(JSON.parse(authorsAsStringValue))
  2. Convert from an OpenAPI JSON format to a YAML format
profile pictureAWS
답변함 2달 전
profile picture
전문가
검토됨 2달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인