AWSTemplateFormatVersion: '2010-09-09' Description: "AWS Marketplace SaaS entitlement and subscription portal (qs-1s3j136e1)" Metadata: QuickStartDocumentation: EntrypointName: "Deploy AWS Marketplace SaaS entitlement and subscription portal" AWS::CloudFormation::Interface: ParameterLabels: AWSMarketplaceMeteringRecordsTableName: default: "Metering records Amazon DynamoDB table name" CreateRegistrationWebPage: default: "Registration page" EntitlementSNSTopic: default: "Entitlements SNS topic ARN" MarketplaceTechAdminEmail: default: "Admin email address" NewSubscribersTableName: default: "New subscribers DynamoDB table name" ProductCode: default: "Product code" SubscriptionSNSTopic: default: "Subscriptions SNS topic ARN" TypeOfSaaSListing: default: "SaaS pricing model" WebsiteS3BucketName: default: "S3 bucket name" # AWS IA configuration ArtifactBucketName: default: Artifact S3 bucket name ParameterGroups: - Label: default: AWS Integration and Automation configuration Parameters: - TypeOfSaaSListing - CreateRegistrationWebPage - WebsiteS3BucketName - ProductCode - SubscriptionSNSTopic - EntitlementSNSTopic - NewSubscribersTableName - AWSMarketplaceMeteringRecordsTableName - MarketplaceTechAdminEmail - Label: default: Quick Starts Parameters (Do not change) Parameters: - ArtifactBucketName Parameters: AWSMarketplaceMeteringRecordsTableName: Default: AWSMarketplaceMeteringRecords Description: "Custom value for the metering records table. Value must be unique per product." Type: String CreateRegistrationWebPage: AllowedValues: - "true" - "false" Default: "true" Description: "Choose 'true' to create a new registration page hosted by Amazon CloudFront. If you already have a custom registration page, choose 'false'." Type: String EntitlementSNSTopic: Description: "If your product is a SaaS contract, use the entitelement SNS topic provided by AWS Marketplace at the time the limited listing was published." Type: String MarketplaceTechAdminEmail: Type: String Description: "The email address that receives SNS notifications for new customer registrations, entitlement changes, and subscription events." NewSubscribersTableName: Default: AWSMarketplaceSubscribers Description: "The custom value for the New Subscribers table. Value must be unique per product." Type: String ProductCode: Description: "The product code provided by AWS Marketplace at the time the limited listing was published." Type: String SubscriptionSNSTopic: Description: "If your product is a SaaS subscription or Saas contract with subscription, use the entitlement SNS topic provided by AWS Marketplace at the time the limited listing was published." Type: String TypeOfSaaSListing: AllowedValues: - contracts_with_subscription - contracts - subscriptions Default: contracts_with_subscription Description: "The SaaS pricing model of your product." Type: String WebsiteS3BucketName: Type: String Description: "The S3 bucket that holds the static HTML registration page files. If this bucket doesn't exist, it is created." # Integration and Automation location parameters ArtifactBucketName: AllowedPattern: ^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$ ConstraintDescription: Staging bucket name can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-). Default: aws-quickstart # TODO: nitpick the name and wording here Description: Name of the S3 bucket name that contains the SAM artifacts. This parameter should not be changed if using the Quick Start solution. Doing so will cause the deployment to fail. Type: String Conditions: CreateRegistrationWebPageCond: !Equals - !Ref CreateRegistrationWebPage - true Resources: SampleApp: Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub "https://${ArtifactBucketName}.s3.amazonaws.com/cloudformation-aws-marketplace-saas/submodules/sam/packaged.yaml" Parameters: AWSMarketplaceMeteringRecordsTableName: !Ref AWSMarketplaceMeteringRecordsTableName CreateRegistrationWebPage: !Ref CreateRegistrationWebPage EntitlementSNSTopic: !Ref EntitlementSNSTopic MarketplaceTechAdminEmail: !Ref MarketplaceTechAdminEmail NewSubscribersTableName: !Ref NewSubscribersTableName ProductCode: !Ref ProductCode SubscriptionSNSTopic: !Ref SubscriptionSNSTopic TypeOfSaaSListing: !Ref TypeOfSaaSListing WebsiteS3BucketName: !If [CreateRegistrationWebPageCond, !Ref WebsiteS3BucketName, !Ref AWS::NoValue] Outputs: APIUrl: Description: API gateway URL to replace baseUrl value in web/script.js Value: !GetAtt SampleApp.Outputs.APIUrl LandingPageUrl: Description: URL to access your landing page and update SaaS URL field in your listing. Value: !GetAtt SampleApp.Outputs.LandingPageUrl