AWS Serverless Application Repository
AWS Serverless Application Repository (serverlessrepo) on fakecloud: a complete 14-operation control plane (100% conformance). restJson1.
fakecloud implements the AWS Serverless Application Repository (SAR) as a restJson1 service. All 14 operations ship with 100% conformance against AWS's own Smithy model, backed by account-partitioned state that persists across restarts in persistent mode. SAR signs SigV4 with the serverlessrepo scope and is routed by HTTP method plus @http URI path under the /applications prefix (POST /applications, GET /applications/{ApplicationId}, PUT /applications/{ApplicationId}/versions/{SemanticVersion}, GET /applications/{ApplicationId}/policy, ...).
AWS Serverless Application Repository on fakecloud is a faithful publishing control plane: every CreateApplication / CreateApplicationVersion / PutApplicationPolicy is reflected by its Get* / List*, DeleteApplication deletes, and a stored SAM/CloudFormation template is really parsed so the Version block returns the same parameterDefinitions a real publish would.
Resources
- Applications -
CreateApplication(POST /applications) validates the requiredauthor,description, andname, then mints anarn:aws:serverlessrepo:<region>:<account>:applications/<name>ARN — which, in SAR, is theapplicationId. It storeshomePageUrl,labels,licenseBody/licenseUrl,readmeBody/readmeUrl,spdxLicenseId, andsourceCodeUrl. When asemanticVersion(plustemplateBody/templateUrl) is supplied, an initial version is seeded.GetApplication(GET /applications/{ApplicationId}, optional?semanticVersion=) returns the application plus itsVersionblock;ListApplicationspaginates with a round-trippingnextToken;UpdateApplication(PATCH) patchesauthor/description/homePageUrl/labels/readmeBody-or-readmeUrl; andDeleteApplication(DELETE) removes it. A duplicate application name is rejected withConflictException; an unknown application id isNotFoundException. - Versions -
CreateApplicationVersion(PUT /applications/{ApplicationId}/versions/{SemanticVersion}) stores a version with itstemplateBody/templateUrl,sourceCodeUrl, andsourceCodeArchiveUrl, parsingparameterDefinitions,requiredCapabilities, andresourcesSupportedfrom the template.ListApplicationVersionspaginates the semantic versions. - Parameter definitions - the template's
Parameterssection is parsed into theParameterDefinitionlist SAR surfaces on theVersionblock:name,type,defaultValue,description,allowedValues,allowedPattern,constraintDescription,min/maxLength,min/maxValue,noEcho, and the requiredreferencedByResources(the logical resource ids thatRefthe parameter).requiredCapabilitiesis derived from the template's resource types (CAPABILITY_IAM/CAPABILITY_NAMED_IAMfor IAM resources,CAPABILITY_RESOURCE_POLICY,CAPABILITY_AUTO_EXPANDfor the SAM transform / nested applications). Both JSON and YAML (the usual SAM authoring format) templates are parsed. - Sharing policy -
PutApplicationPolicy(PUT /applications/{ApplicationId}/policy) stores the sharing statements (principals,actions,principalOrgIDs), assigning astatementIdto any statement that omits one;GetApplicationPolicyreturns them; andUnshareApplication(POST /applications/{ApplicationId}/unshare) removes an organisation (organizationId) from every statement'sprincipalOrgIDs. - CloudFormation templates -
CreateCloudFormationTemplate(POST /applications/{ApplicationId}/templates) mints atemplateId, a creation + expiration time, and atemplateUrlthat points back at this fakecloud host, with statusPREPARING.GetCloudFormationTemplatesettles the status toACTIVEon the first read. - Dependencies -
ListApplicationDependencies(GET /applications/{ApplicationId}/dependencies, optional?semanticVersion=) returns the nested-application dependencies parsed from the template'sAWS::Serverless::Applicationresources (an empty list when there are none), paginated.
Validation and errors
Model-derived validation rejects contract violations with the error codes SAR declares: a missing required body member or an omitted required path label -> BadRequestException; an unknown application / version / template -> NotFoundException; a duplicate application name -> ConflictException. The full declared set is BadRequestException, NotFoundException, ConflictException, ForbiddenException, InternalServerErrorException, and TooManyRequestsException.
Honest gaps (documented, not stubbed)
CreateCloudFormationChangeSetreturns well-formedchangeSetId,stackId,applicationId, andsemanticVersionvalues, but fakecloud does not drive the CloudFormation service to materialise a real stack or change set. There is no clean in-process seam to do so, and fabricating a stack the CloudFormation service does not know about would be worse than an honest, correctly-shaped identifier. Clients that call the operation and read back the returned identifiers behave as against AWS; a subsequentExecuteChangeSetagainst the CloudFormation service would not find the change set.templateUrl(returned by theVersionblock and byCreateCloudFormationTemplate/GetCloudFormationTemplate) is a well-formed, deterministic URL pointing back at this fakecloud host. The SAR control plane stores the template body in memory, but fakecloud does not currently serve the raw template bytes at that URL.
Everything else — application, version, policy, and template storage, plus the parameterDefinition parsing — works in memory and persists across restarts.