aws / aws-sdk-go-v2

AWS SDK for the Go programming language.
https://aws.github.io/aws-sdk-go-v2/docs/
Apache License 2.0
2.66k stars 639 forks source link

DynamoDB: Scan deserialization failed, failed to decode response body, context canceled #2361

Closed mrunal-pp closed 11 months ago

mrunal-pp commented 1 year ago

Describe the bug

Our service makes DynamoDB scan requests periodically and the error we encounter looks like this:

operation error DynamoDB: Scan, https response error StatusCode: 200, RequestID: 7NRFFA65VDVSNUIJIMAPCQETUBVV4KQNSO5AEMVJF66Q9ASUAAJG, deserialization failed, failed to decode response body, context canceled

The amount of records in the Dyanmo DB table is less than 100, and the DynamoDB query fired has a limit of 100. The object returned is a list of records in the DyanmoDB table and the object is a very complex | nested JSON.

This is a transient error and the issue is not encountered if we make a second request.

We also contacted AWS support to see what kind of logs they see on their side based on the request IDs. They don't have any errors and are getting a 200 status code.

Expected Behavior

The object returned is a list of records in the DyanmoDB table and the object is a very complex | nested JSON. Sample object:

{
    "stream": {
        "name": "test-5",
        "editId": "test-5",
        "editIdNamespace": "test-editNameSpace",
        "sourceId": "stn-zemkzamulhb6n2th",
        "type": "event",
        "configId": "akamai-msl4-amo-mp-test",
        "redundancy": "multi_region",
        "id": "test-5",
        "status": "idle",
        "channels": [
            {
                "channelId": "test-5-us-west",
                "priority": "primary",
                "region": "US_WEST",
                "version": 2
            },
            {
                "channelId": "test-5-us-east",
                "priority": "secondary",
                "region": "US_EAST",
                "version": 2
            }
        ],
        "desiredState": "OFF",
        "presented": false,
        "activePlaybackChannel": "primary",
        "streamTemplate": {
            "channelTemplate": {
                "ingest": {
                    "slate": {
                        "source_loss_url": "https://plato-slates-prod.s3.amazonaws.com/out/max-atmospassthrough/Max_Live_Slate_Error_v07_Mix1_514.ts"
                    },
                    "source": {
                        "audio_sources": [
                            {
                                "id": "audio1-english",
                                "language": "en-US",
                                "name": "English",
                                "selector": "eac3 || ac3; aac; mpa"
                            }
                        ],
                        "id": "stn-afzhfeh5u9mu99m5"
                    }
                },
                "packaging": {
                    "packagers": {
                        "packager-mp4-cenc": {
                            "#max_kms": {
                                "type": "CENC"
                            }
                        }
                    }
                },
                "publishing": {
                    "closed_caption_streams": [
                        {
                            "auto_select": "YES",
                            "default": "YES",
                            "language": "en-US",
                            "name": "Closed Captions"
                        }
                    ],
                    "feature_flags": [
                        "single-tenant-distribution",
                        "go-media-packager",
                        "dash_codecs_in_own_adaptation_set",
                        "mpd-emit-content-type"
                    ],
                    "live2vod": {
                        "clear_capture": true,
                        "product_id": "bolt-glo-dev",
                        "retention_days": 30
                    },
                    "publications": [
                        {
                            "#template_redundant_publishing": [
                                {
                                    "encoderRegion": "US_EAST",
                                    "publish": true
                                }
                            ],
                            "create_vods": false,
                            "dash": {
                                "minimum_update_period_secs": 4,
                                "signaling_formats": [
                                    "SCTE35_BIN"
                                ],
                                "suggested_presentation_delay_secs": 12
                            },
                            "dvr_window_secs": 21600,
                            "packager_id": "packager-mp4-cenc",
                            "publish_points": [
                                {
                                    "#akamai-msl4": {
                                        "claimName": "packager-mp4-cenc",
                                        "encoderRegion": "US_WEST",
                                        "hostname": "020-dn004-wbdboltus.akamaiorigin.net",
                                        "useSuffix": "dash-30fps-cenc"
                                    },
                                    "id": "dash-30fps-cenc-west-primary",
                                    "playlist_only_for": "dash-60fps-cenc-west-primary"
                                },
                                {
                                    "#media-origin": {
                                        "encoderRegion": "US_EAST",
                                        "playbackHostname": "media-origin.stage-us.stream.istreamplanet.net",
                                        "publishHostname": "max@max-stage-use1-ingest.stage.origin.istreamplanet.net",
                                        "useSuffix": "dash-30fps-cenc"
                                    },
                                    "http": {
                                        "compression": "GZIP"
                                    },
                                    "id": "dash-30fps-cenc-east-primary",
                                    "playlist_only_for": "dash-60fps-cenc-east-primary"
                                },
                                {
                                    "#media-origin": {
                                        "encoderRegion": "US_EAST",
                                        "playbackHostname": "media-origin.stage-us.stream.istreamplanet.net",
                                        "publishHostname": "max@max-stage-usw2-ingest.stage.origin.istreamplanet.net",
                                        "useSuffix": "dash-30fps-cenc"
                                    },
                                    "http": {
                                        "compression": "GZIP"
                                    },
                                    "id": "dash-30fps-cenc-east-backup",
                                    "playlist_only_for": "dash-60fps-cenc-east-backup"
                                }
                            ],
                            "startover": {
                                "first_program_start": {}
                            },
                            "thumbnail_encoder_ids": [
                                "thumbnails"
                            ],
                            "video_encoder_ids": [
                                "576p-30fps-2500kbps",
                                "720p-30fps-3800kbps",
                                "180p-30fps-200kbps",
                                "198p-30fps-300kbps",
                                "234p-30fps-450kbps",
                                "288p-30fps-700kbps",
                                "360p-30fps-1100kbps",
                                "450p-30fps-1650kbps"
                            ]
                        },
                        {
                            "#template_redundant_publishing": [
                                {
                                    "encoderRegion": "US_EAST",
                                    "publish": true
                                }
                            ],
                            "create_vods": false,
                            "dash": {
                                "minimum_update_period_secs": 4,
                                "signaling_formats": [
                                    "SCTE35_BIN"
                                ],
                                "suggested_presentation_delay_secs": 12
                            },
                            "dvr_window_secs": 21600,
                            "master_playlist_name": "master",
                            "packager_id": "packager-mp4-cenc",
                            "publish_points": [
                                {
                                    "#akamai-msl4": {
                                        "claimName": "packager-mp4-cenc",
                                        "encoderRegion": "US_WEST",
                                        "hostname": "020-dn004-wbdboltus.akamaiorigin.net",
                                        "useSuffix": "dash-60fps-cenc"
                                    },
                                    "id": "dash-60fps-cenc-west-primary"
                                },
                                {
                                    "#media-origin": {
                                        "encoderRegion": "US_EAST",
                                        "playbackHostname": "media-origin.stage-us.stream.istreamplanet.net",
                                        "publishHostname": "max@max-stage-use1-ingest.stage.origin.istreamplanet.net",
                                        "useSuffix": "dash-60fps-cenc"
                                    },
                                    "http": {
                                        "compression": "GZIP"
                                    },
                                    "id": "dash-60fps-cenc-east-primary"
                                },
                                {
                                    "#media-origin": {
                                        "encoderRegion": "US_EAST",
                                        "playbackHostname": "media-origin.stage-us.stream.istreamplanet.net",
                                        "publishHostname": "max@max-stage-usw2-ingest.stage.origin.istreamplanet.net",
                                        "useSuffix": "dash-60fps-cenc"
                                    },
                                    "http": {
                                        "compression": "GZIP"
                                    },
                                    "id": "dash-60fps-cenc-east-backup"
                                }
                            ],
                            "startover": {
                                "first_program_start": {}
                            },
                            "thumbnail_encoder_ids": [
                                "thumbnails"
                            ],
                            "video_encoder_ids": [
                                "720p-60fps-6000kbps",
                                "1080p-60fps-10000kbps",
                                "576p-30fps-2500kbps",
                                "720p-30fps-3800kbps",
                                "180p-30fps-200kbps",
                                "198p-30fps-300kbps",
                                "234p-30fps-450kbps",
                                "288p-30fps-700kbps",
                                "360p-30fps-1100kbps",
                                "450p-30fps-1650kbps"
                            ]
                        },
                        {
                            "#template_redundant_publishing": [
                                {
                                    "encoderRegion": "US_EAST",
                                    "publish": true
                                }
                            ],
                            "audio_encoder_ids": [
                                "aac64"
                            ],
                            "dash": {
                                "minimum_update_period_secs": 4,
                                "signaling_formats": [
                                    "SCTE35_BIN"
                                ],
                                "suggested_presentation_delay_secs": 12
                            },
                            "dvr_window_secs": 300,
                            "packager_id": "packager-mp4-cenc",
                            "publish_points": [
                                {
                                    "#akamai-msl4": {
                                        "claimName": "packager-mp4-cenc",
                                        "encoderRegion": "US_WEST",
                                        "hostname": "020-dn004-wbdboltus.akamaiorigin.net",
                                        "useSuffix": "dash-cenc-fb"
                                    },
                                    "id": "dash-cenc-west-primary-fb",
                                    "playlist_only_for": "dash-60fps-cenc-west-primary"
                                },
                                {
                                    "#media-origin": {
                                        "encoderRegion": "US_EAST",
                                        "playbackHostname": "media-origin.stage-us.stream.istreamplanet.net",
                                        "publishHostname": "max@max-stage-use1-ingest.stage.origin.istreamplanet.net",
                                        "useSuffix": "dash-cenc-fb"
                                    },
                                    "http": {
                                        "compression": "GZIP"
                                    },
                                    "id": "dash-cenc-east-primary-fb",
                                    "playlist_only_for": "dash-60fps-cenc-east-primary"
                                },
                                {
                                    "#media-origin": {
                                        "encoderRegion": "US_EAST",
                                        "playbackHostname": "media-origin.stage-us.stream.istreamplanet.net",
                                        "publishHostname": "max@max-stage-usw2-ingest.stage.origin.istreamplanet.net",
                                        "useSuffix": "dash-cenc-fb"
                                    },
                                    "http": {
                                        "compression": "GZIP"
                                    },
                                    "id": "dash-cenc-east-backup-fb",
                                    "playlist_only_for": "dash-60fps-cenc-east-backup"
                                }
                            ],
                            "startover": {
                                "first_program_start": {}
                            },
                            "thumbnail_encoder_ids": [
                                "thumbnails"
                            ],
                            "video_encoder_ids": [
                                "576p-30fps-2500kbps",
                                "720p-30fps-3800kbps",
                                "180p-30fps-200kbps",
                                "198p-30fps-300kbps",
                                "234p-30fps-450kbps",
                                "288p-30fps-700kbps",
                                "360p-30fps-1100kbps",
                                "450p-30fps-1650kbps"
                            ]
                        }
                    ]
                },
                "resource_class": "STATIC",
                "signaling": {
                    "blackout_settings": {
                        "default_blackout_slate_url": "https://plato-slates-prod.s3.amazonaws.com/out/max-atmospassthrough/Max_Live_Slate_Adbreak_v07_Mix1_514.ts"
                    },
                    "disable_inband_parsing": true,
                    "segments": [
                        "BREAK",
                        "CHAPTER",
                        "DISTRIBUTOR_AD",
                        "DISTRIBUTOR_OVERLAY_OP",
                        "DISTRIBUTOR_PLACEMENT_OP",
                        "NETWORK",
                        "PROGRAM",
                        "PROVIDER_AD",
                        "PROVIDER_OVERLAY_OP",
                        "PROVIDER_PLACEMENT_OP",
                        "SPLICE_INSERT"
                    ]
                },
                "transcode": {
                    "audio_encoders": [
                        {
                            "audio_source_id": "audio1-english",
                            "bit_rate": 64000,
                            "channels": 2,
                            "codec": "HE_AAC",
                            "id": "aac64",
                            "loudness": {
                                "dialog_intel": false,
                                "lkfs": -24,
                                "peak_limit": -2
                            },
                            "sample_rate": 48000
                        },
                        {
                            "audio_source_id": "audio1-english",
                            "bit_rate": 640000,
                            "channels": 6,
                            "codec": "EAC3",
                            "eac3": {
                                "ddp_joc_passthrough": true
                            },
                            "id": "eac3640",
                            "loudness": {
                                "dialog_intel": false,
                                "lkfs": -24,
                                "peak_limit": -2
                            },
                            "sample_rate": 48000
                        }
                    ],
                    "feature_flags": [
                        "debug_overlay"
                    ],
                    "overlays": [
                        {
                            "image_url": "https://t2-customer-slates.s3-us-west-2.amazonaws.com/aventus/overlay/v-encoded-using-aventus-right-middle-1080.png"
                        }
                    ],
                    "segmenter": {
                        "gop_duration_secs": 3.2,
                        "segment_duration_secs": 3.2
                    },
                    "thumbnail_encoders": [
                        {
                            "height": 198,
                            "id": "thumbnails",
                            "width": 352
                        }
                    ],
                    "video_encoders": [
                        {
                            "bit_rate": 2500000,
                            "frame_rate": "FR_30",
                            "h264": {
                                "profile": "HIGH"
                            },
                            "height": 576,
                            "id": "576p-30fps-2500kbps",
                            "width": 1024
                        },
                        {
                            "bit_rate": 3800000,
                            "frame_rate": "FR_30",
                            "h264": {
                                "profile": "HIGH"
                            },
                            "height": 720,
                            "id": "720p-30fps-3800kbps",
                            "width": 1280
                        },
                        {
                            "bit_rate": 200000,
                            "frame_rate": "FR_30",
                            "h264": {
                                "profile": "HIGH"
                            },
                            "height": 180,
                            "id": "180p-30fps-200kbps",
                            "width": 320
                        },
                        {
                            "bit_rate": 300000,
                            "frame_rate": "FR_30",
                            "h264": {
                                "profile": "HIGH"
                            },
                            "height": 198,
                            "id": "198p-30fps-300kbps",
                            "width": 352
                        },
                        {
                            "bit_rate": 450000,
                            "frame_rate": "FR_30",
                            "h264": {
                                "profile": "HIGH"
                            },
                            "height": 234,
                            "id": "234p-30fps-450kbps",
                            "width": 416
                        },
                        {
                            "bit_rate": 700000,
                            "frame_rate": "FR_30",
                            "h264": {
                                "profile": "HIGH"
                            },
                            "height": 288,
                            "id": "288p-30fps-700kbps",
                            "width": 512
                        },
                        {
                            "bit_rate": 1100000,
                            "frame_rate": "FR_30",
                            "h264": {
                                "profile": "HIGH"
                            },
                            "height": 360,
                            "id": "360p-30fps-1100kbps",
                            "width": 640
                        },
                        {
                            "bit_rate": 1650000,
                            "frame_rate": "FR_30",
                            "h264": {
                                "profile": "HIGH"
                            },
                            "height": 450,
                            "id": "450p-30fps-1650kbps",
                            "width": 800
                        },
                        {
                            "bit_rate": 6000000,
                            "frame_rate": "FR_60",
                            "h264": {
                                "profile": "HIGH"
                            },
                            "height": 720,
                            "id": "720p-60fps-6000kbps",
                            "width": 1280
                        },
                        {
                            "bit_rate": 10000000,
                            "frame_rate": "FR_60",
                            "h264": {
                                "profile": "HIGH"
                            },
                            "height": 1080,
                            "id": "1080p-60fps-10000kbps",
                            "width": 1920
                        }
                    ]
                }
            },
            "createdDate": "2023-11-01T20:36:36.002335592Z",
            "description": "Event 2 Origin Case 4 Live-5656",
            "encoderRegions": [
                "US_WEST",
                "US_EAST"
            ],
            "id": "akamai-msl4-amo-mp-test",
            "isLatest": true,
            "updatedDate": "2023-11-01T20:40:16.117128149Z",
            "version": 2
        },
        "createdDate": "2023-11-09T18:30:32.361561519Z",
        "updatedDate": "2023-11-09T18:30:32.361561519Z"
    }
}

Current Behavior

Our service makes DynamoDB scan requests periodically and the error we encounter looks like this:

operation error DynamoDB: Scan, https response error StatusCode: 200, RequestID: 7NRFFA65VDVSNUIJIMAPCQETUBVV4KQNSO5AEMVJF66Q9ASUAAJG, deserialization failed, failed to decode response body, context canceled

Reproduction Steps

If we make a lot of requests to DynamoDB one after the other, it seems to have encountered the above error.

Possible Solution

No response

Additional Information/Context

No response

AWS Go SDK V2 Module Versions Used


go 1.19

require (
    github.com/aws/aws-sdk-go-v2 v1.21.0
    github.com/aws/aws-sdk-go-v2/config v1.18.21
    github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.10.22
    github.com/aws/aws-sdk-go-v2/service/dynamodb v1.19.5
    github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.19.3
    github.com/aws/aws-sdk-go-v2/service/sns v1.22.0
    github.com/aws/aws-sdk-go-v2/service/sqs v1.19.12
    github.com/aws/aws-sdk-go-v2/service/sts v1.18.9
    github.com/danielgtaylor/huma v1.14.2
    github.com/docker/distribution v2.8.1+incompatible
    github.com/golang-migrate/migrate/v4 v4.15.2
    github.com/golang/mock v1.6.0
    github.com/google/uuid v1.3.0
    github.com/nsf/jsondiff v0.0.0-20210926074059-1e845ec5d249
    github.com/prometheus/client_golang v1.15.0
    github.com/segmentio/kafka-go v0.4.39
    github.com/slack-go/slack v0.12.2
    github.com/stretchr/testify v1.8.4
    github.com/uptrace/bun v1.1.12
    github.com/uptrace/bun/dialect/pgdialect v1.1.12
    github.com/uptrace/bun/driver/pgdriver v1.1.12
    github.com/wbd-streaming/global-communication-schema-go v1.273.0
    github.com/wbd-streaming/service-frameworks-go/bolt-tracing v0.0.0-20230404164051-0c3e8ac90e5a
    github.com/wbd-streaming/wbd-go-common v0.8.3
    github.com/zencoder/go-dash/v3 v3.0.3
    golang.org/x/oauth2 v0.7.0
)

require (
    github.com/aws/aws-sdk-go v1.44.245 // indirect
    github.com/benbjohnson/clock v1.3.0 // indirect
    github.com/envoyproxy/protoc-gen-validate v0.10.1 // indirect
    github.com/frankban/quicktest v1.14.4 // indirect
    github.com/gorilla/mux v1.8.0 // indirect
    github.com/gorilla/websocket v1.5.0 // indirect
    github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
    github.com/josharian/intern v1.0.0 // indirect
    github.com/klauspost/compress v1.16.5 // indirect
    github.com/launchdarkly/ccache v1.1.0 // indirect
    github.com/launchdarkly/eventsource v1.7.1 // indirect
    github.com/launchdarkly/go-semver v1.0.2 // indirect
    github.com/mailru/easyjson v0.7.7 // indirect
    github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
    github.com/pierrec/lz4/v4 v4.1.17 // indirect
    github.com/sirupsen/logrus v1.9.0 // indirect
    github.com/xdg/scram v1.0.5 // indirect
    github.com/xdg/stringprep v1.0.3 // indirect
    golang.org/x/net v0.9.0 // indirect
    golang.org/x/sync v0.1.0 // indirect
    google.golang.org/appengine v1.6.7 // indirect
    gopkg.in/launchdarkly/go-jsonstream.v1 v1.0.1 // indirect
    gopkg.in/launchdarkly/go-sdk-common.v2 v2.5.1 // indirect
    gopkg.in/launchdarkly/go-sdk-events.v1 v1.1.1 // indirect
    gopkg.in/launchdarkly/go-server-sdk-evaluation.v1 v1.5.0 // indirect
    gopkg.in/launchdarkly/go-server-sdk.v5 v5.10.1 // indirect
)

require (
    github.com/Jeffail/gabs/v2 v2.7.0 // indirect
    github.com/andybalholm/brotli v1.0.5 // indirect
    github.com/aws/aws-sdk-go-v2/credentials v1.13.20 // indirect
    github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.2 // indirect
    github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect
    github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect
    github.com/aws/aws-sdk-go-v2/internal/ini v1.3.33 // indirect
    github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.14.9 // indirect
    github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 // indirect
    github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.7.26 // indirect
    github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.26 // indirect
    github.com/aws/aws-sdk-go-v2/service/sso v1.12.8 // indirect
    github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.8 // indirect
    github.com/aws/smithy-go v1.14.2
    github.com/beorn7/perks v1.0.1 // indirect
    github.com/cespare/xxhash/v2 v2.2.0 // indirect
    github.com/danielgtaylor/casing v0.0.0-20210126043903-4e55e6373ac3 // indirect
    github.com/davecgh/go-spew v1.1.1 // indirect
    github.com/evanphx/json-patch/v5 v5.6.0 // indirect
    github.com/fatih/color v1.15.0 // indirect
    github.com/fatih/structs v1.1.0 // indirect
    github.com/fsnotify/fsnotify v1.6.0 // indirect
    github.com/fxamacker/cbor/v2 v2.4.0
    github.com/go-chi/chi v4.1.2+incompatible
    github.com/goccy/go-yaml v1.11.0 // indirect
    github.com/golang/protobuf v1.5.3
    github.com/graphql-go/graphql v0.8.1 // indirect
    github.com/graphql-go/handler v0.2.3 // indirect
    github.com/hashicorp/errwrap v1.1.0 // indirect
    github.com/hashicorp/go-multierror v1.1.1 // indirect
    github.com/hashicorp/hcl v1.0.0 // indirect
    github.com/inconshreveable/mousetrap v1.1.0 // indirect
    github.com/istreamlabs/go-sdk v1.10.0
    github.com/jinzhu/inflection v1.0.0 // indirect
    github.com/jmespath/go-jmespath v0.4.0 // indirect
    github.com/koron-go/gqlcost v0.3.0 // indirect
    github.com/lib/pq v1.10.8 // indirect
    github.com/magiconair/properties v1.8.7 // indirect
    github.com/mattn/go-colorable v0.1.13 // indirect
    github.com/mattn/go-isatty v0.0.18 // indirect
    github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
    github.com/mitchellh/mapstructure v1.5.0 // indirect
    github.com/opentracing/opentracing-go v1.2.0 // indirect
    github.com/pelletier/go-toml/v2 v2.0.7 // indirect
    github.com/pkg/errors v0.9.1 // indirect
    github.com/pmezard/go-difflib v1.0.0 // indirect
    github.com/prometheus/client_model v0.3.0 // indirect
    github.com/prometheus/common v0.42.0 // indirect
    github.com/prometheus/procfs v0.9.0 // indirect
    github.com/rs/zerolog v1.29.1
    github.com/spf13/afero v1.9.5 // indirect
    github.com/spf13/cast v1.5.0 // indirect
    github.com/spf13/cobra v1.7.0
    github.com/spf13/jwalterweatherman v1.1.0 // indirect
    github.com/spf13/pflag v1.0.5 // indirect
    github.com/spf13/viper v1.15.0 // indirect
    github.com/stretchr/objx v0.5.0 // indirect
    github.com/subosito/gotenv v1.4.2 // indirect
    github.com/tent/http-link-go v0.0.0-20130702225549-ac974c61c2f9 // indirect
    github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect
    github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
    github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
    github.com/x448/float16 v0.8.4 // indirect
    github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
    github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
    github.com/xeipuuv/gojsonschema v1.2.0 // indirect
    go.uber.org/atomic v1.10.0 // indirect
    go.uber.org/multierr v1.11.0 // indirect
    go.uber.org/zap v1.24.0
    golang.org/x/crypto v0.8.0 // indirect
    golang.org/x/sys v0.7.0 // indirect
    golang.org/x/text v0.9.0 // indirect
    golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
    google.golang.org/protobuf v1.30.0
    gopkg.in/ini.v1 v1.67.0 // indirect
    gopkg.in/yaml.v3 v3.0.1 // indirect
    mellium.im/sasl v0.3.1 // indirect
)

Compiler and Version used

go version go1.20.1 darwin/amd64

Operating System and version

kubernetes cluster

RanVaknin commented 12 months ago

Hi @mrunal-patekar-discovery ,

Thanks for reaching out. This is indeed an odd behavior. Since you didn't include your actual application code its hard to speculate, but there are two errors in there. One suggested that the context (usually set by the user) has timed out. Are you setting a context timeout when creating your config object?

Something like:

        ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) // timeout here might be too short?
    defer cancel()

    cfg, err := config.LoadDefaultConfig(ctx, config.WithRegion("us-east-1"))
    if err != nil {
        log.Fatalf("unable to load SDK config, %v", err)
    }

The other error points a deserialization error. This usually indicates the SDK expected a response in a certain format and received some other response instead. You can also enable the raw request and response logger to see if the service responds with a problematic body that causes the SDK deserialization logic to throw an error:

    cfg, err := config.LoadDefaultConfig(ctx, config.WithRegion("us-east-1"), config.WithClientLogMode(aws.LogRequestWithBody|aws.LogResponseWithBody))
    if err != nil {
        log.Fatalf("unable to load SDK config, %v", err)
    }

If you can share your code, and those output logs with us (please redact any sensitive info like credential info) that would help diagnose the problem.

Thanks again, Ran~

github-actions[bot] commented 12 months ago

This issue has not received a response in 1 week. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.