AWS Support
AWS Support on fakecloud: the full 20-operation surface -- support cases, communications, attachment sets, presigned attachment uploads and downloads, severity levels, the service/category catalogue, and the Trusted Advisor check catalogue + refresh state machine -- with account-partitioned persistence. The Trusted Advisor analysis engine and the live support agent are documented gaps.
fakecloud implements AWS Support (support), the programmatic interface to AWS Support cases and AWS Trusted Advisor. All 20 operations from the AWS Smithy model ship now, backed by account-partitioned state that persists across restarts in persistent mode. The wire protocol is awsJson1.1 (x-amz-target AWSSupport_20130415.<Op>), signing as support.
This is the control plane: every case, communication, attachment set, and Trusted Advisor refresh status is real, validated, persisted state -- no stubbed success responses. Requests are validated against the model's required / length / range constraints before any handler runs, and an operation that dereferences a case that does not exist returns Support's CaseIdNotFound; an unknown attachment id returns AttachmentIdNotFound, an unknown attachment set id returns AttachmentSetIdNotFound, and an unknown, expired, or already-completed upload id returns UploadIdNotFound. Every operation that models DryRunOperationException honours dryRun: the request is validated and then refused without touching state.
Supported features
Support cases
CreateCasemints an AWS-shaped case id (case-{account}-{year}-{hex}) and a numericdisplayId, opens the case withstatus: "opened", records thesubject/serviceCode/severityCode/categoryCode/ccEmailAddresses/language/issueType, and seeds the case's communication thread with the initialcommunicationBody. A suppliedattachmentSetIdis resolved onto the first communication (an unknown set id returnsAttachmentSetIdNotFound).DescribeCasesfilters bycaseIdList(an unknown id returnsCaseIdNotFound),displayId,afterTime/beforeTime,includeResolvedCases(resolved cases are hidden by default), andincludeCommunications(the recent-communications thread is embedded by default), and paginates with a round-trippingnextToken.AddCommunicationToCaseappends a communication to the thread and returnsresult: true.DescribeCommunicationsreturns the case's communication thread, filtered by time window and paginated with anextToken.ResolveCaseflips the case toresolvedand returns both theinitialCaseStatusand thefinalCaseStatus.
Attachment sets
AddAttachmentsToSetmints a newattachmentSetId(or extends an existing one) and returns it with anexpiryTimeone hour out. Each attachment is stored under a generatedattachmentId.DescribeAttachmentreturns a stored attachment (fileName+ base64data) by id.
Presigned attachment uploads
Large attachments do not travel in the API request. AWS hands out presigned links and the client transfers the bytes itself; fakecloud does the same, with the links pointing back at fakecloud, which serves them.
GetAttachmentUploadLinksrecords a new upload (or resumes one named byuploadId, optionally narrowed to anuploadRange) and returns anuploadId, thepartSizeBytes(5 MiB), thetotalPartsderived fromfileSizeBytes, thenextIndexto ask for next, and one presignedPUTurlper part with its ownexpiryDate. At most ten links come back per call,uploadRange.endIndexis exclusive ({1, 4}is parts 1, 2 and 3) and a wider range is rejected, andnextIndexisnullonce the last part has been handed out. Re-asking for a part that already has a live link returns that same link rather than rotating its signature, and re-asking never extends the upload's own deadline. Each link carries its own signature, recorded in state; a link that was never issued, was tampered with, or has expired is refused.- The links are real.
PUTthe part's bytes to the URL and fakecloud stores them and returns the part'sETag, exactly as an S3 part upload does. Every part but the last must be exactlypartSizeBytes, and the last part the remainder offileSizeBytes; a wrongly sized part is rejected. CompleteAttachmentUploadtakes theuploadIdand thecompletedUploadslist of{partIndex, eTag}. It can be called one part at a time or with several parts at once: each named part must have been uploaded with anETagmatching what thePUTreturned, and the upload staysattachment-not-readyuntil every part has been completed, at which point the parts are concatenated into a real attachment retrievable withDescribeAttachment. Completing twice, or completing an upload whose links expired, returnsUploadIdNotFound.DescribeAttachmentUploadStatusreports the recordeduploadStatus(attachment-not-ready/attachment-ready/failed), thefileName, and theuploadProgress(totalParts+completedPartsCount).GetAttachmentDownloadLinkmints a presignedGETlink for a stored attachment and returns it with thefileNameand anexpiryDate. Following the link serves the attachment's bytes; an unknown attachment id returnsAttachmentIdNotFound.- A completed upload attaches to a case through
uploadIdsonCreateCaseorAddCommunicationToCase; the resulting communication lists it underattachments.
Severity levels + case-creation reference data
DescribeSeverityLevelsreturns the five real severity levels (low,normal,high,urgent,critical).DescribeServicesreturns the support service/category catalogue, optionally filtered byserviceCodeList.DescribeCreateCaseOptionsandDescribeSupportedLanguagesreturn well-formed case-creation option and supported-language data.
Trusted Advisor
DescribeTrustedAdvisorChecksreturns the vendored catalogue of the well-known Trusted Advisor checks (id / name / description / category / metadata column headers) across all five categories -- cost optimising, security, fault tolerance, performance, and service limits. This is faithful static AWS reference data, not fabricated findings.DescribeTrustedAdvisorCheckResultandDescribeTrustedAdvisorCheckSummariesreturn well-formed result / summary shapes (status, timestamp,resourcesSummary,categorySpecificSummary,flaggedResources) reporting an all-clear account (zero flagged resources).RefreshTrustedAdvisorCheckenqueues a refresh andDescribeTrustedAdvisorCheckRefreshStatusesadvances the per-check state machine one step on each read:none->enqueued->processing->success, withmillisUntilNextRefreshable.
Honest gap: no Trusted Advisor engine, no live support agent
AWS Support's value is a human/automated support agent working your case and the Trusted Advisor analysis engine inspecting your account. fakecloud runs neither. Cases are real records with a real communication thread, but no automated agent reply is generated -- a case stays exactly as you and your own AddCommunicationToCase calls leave it. Trusted Advisor returns the real check catalogue and a real refresh state machine, but DescribeTrustedAdvisorCheckResult / DescribeTrustedAdvisorCheckSummaries report a structurally correct all-clear result (zero flagged resources) rather than inspecting your account and inventing findings. Everything around the analysis -- cases, communications, attachment sets, severity levels, the service catalogue, the check catalogue, the refresh lifecycle, validation, and persistence -- is faithful. If your workload needs the Support contract (open a case, thread communications, resolve it; enumerate checks and drive a refresh), fakecloud is a faithful stand-in; if it needs an actual agent reply or real account findings, that is out of scope.
Validation
Every request is validated against the Support Smithy model's required / length / range constraints before any handler runs. (@pattern is not enforced: the only patterned member, serviceCode, is taken by operations that declare no generic validation exception, so surfacing a pattern rejection would fall outside their Smithy error contract.) The declared exceptions CaseIdNotFound, AttachmentIdNotFound, AttachmentSetIdNotFound, AttachmentSetExpired, AttachmentSetSizeLimitExceeded, AttachmentLimitExceeded, DescribeAttachmentLimitExceeded, CaseCreationLimitExceeded, UploadIdNotFound, DryRunOperationException, and InternalServerError model the service's error surface.
Persistence
Support state is account-partitioned and, in persistent mode, snapshotted to disk and restored on restart. Cases, communication threads, attachment sets, individual attachments, in-flight attachment uploads (including the bytes already uploaded to their presigned links), issued download grants, and Trusted Advisor refresh statuses all survive a restart. An upload whose links expired while the server was down is swept to failed on load rather than resurrected.