Getting 504 Error on all S3 calls from Android

Viewed 143

In the last couple hours my app started giving this error whenever I try to upload something to S3.

Unable to unmarshall error response (Unable to parse JSON String.). Response Code: 504, Response Text: Gateway Time-out, Response Headers: {X-Android-Selected-Protocol=http/1.1, Server=awselb/2.0, Connection=keep-alive, X-Android-Response-Source=NETWORK 504, X-Android-Sent-Millis=1606318289732, Content-Length=132, X-Android-Received-Millis=1606318300066, Date=Wed, 25 Nov 2020 15:31:41 GMT, Content-Type=text/html}

We are using this to instantiante and upload our files:

sTransferUtility = TransferUtility.builder()
                                .context(mActivity)
                                .awsConfiguration(AWSMobileClient.getInstance().getConfiguration())
                                .s3Client(new AmazonS3Client(sCredProvider, Region.getRegion(Regions.US_EAST_1)))
                                .build();

...

TransferObserver observer = sTransferUtility.upload(MY_BUCKET, mPictureFile.getName(), mPictureFile);
...

observer.setTransferListener(new TransferListener() {
                        @Override
                        public void onStateChanged(int id, TransferState state) {
                            if (state == TransferState.COMPLETED) {
                                ...
                            } else if (state == TransferState.CANCELED || state == TransferState.FAILED) {
                                ...
                            }
                        }

                        @Override
                        public void onProgressChanged(int id, long bytesCurrent, long bytesTotal) {
                        }

                        @Override
                        public void onError(int id, Exception ex) {
                            //THIS IS WHERE THE ERROR RETURNS
                        }
                    });
1 Answers

Apparently there is a major issue at AWS us-east-1 region.

9:52 AM PST: The Kinesis Data Streams API is currently impaired in the US-EAST-1 Region. As a result customers are not able to write or read data published to Kinesis streams. CloudWatch metrics and events are also affected, with elevated PutMetricData API error rates and some delayed metrics. While EC2 instances and connectivity remain healthy, some instances are experiencing delayed instance health metrics, but remain in a healthy state. AutoScaling is also experiencing delays in scaling times due to CloudWatch metric delays. The issue is also affecting other services, including ACM, Amplify Console, API Gateway, AppMesh, AppStream2, AppSync, Athena, Batch, CloudFormation, CloudTrail, Cognito, Connect, DynamoDB, EventBridge, Glue, IoT Services, Lambda, LEX, Managed Blockchain, Marketplace, Personalize, RDS, Resource Groups, SageMaker, Support Console, Well Architected, and Workspaces. For further details on each of these services, please see the Personal Health Dashboard. Other services, like S3, remain unaffected by this event. This issue has also affected our ability to post updates to the Service Health Dashboard. We are continuing to work towards resolution.

More info here: https://status.aws.amazon.com/

Related