--- AWSTemplateFormatVersion: 2010-09-09 # Do NOT remove the RETAIL_DS prefix in the template description below! Description: > RETAIL_DS: This template deploys the Retail Demo Store reference architecture and workshop notebooks. (uksb-1t80l2nq1) Metadata: AWS::CloudFormation::Interface: ParameterGroups: - Label: default: "Retail Demo Store Deployment Configuration" Parameters: - ResourceBucket - ResourceBucketRelativePath - CreateOpenSearchServiceLinkedRole - Label: default: "Source Deployment Approach" Parameters: - SourceDeploymentType - Label: default: "GitHub Repository" Parameters: - GitHubRepo - GitHubBranch - GitHubUser - GitHubToken - Label: default: "Auto-Build Resources" Parameters: - PreIndexOpenSearch - PreCreatePersonalizeResources - PreCreatePinpointWorkshop - PinpointEmailFromAddress - PinpointEmailFromName - PinpointSMSLongCode - Label: default: "Use default IVS streams" Parameters: - UseDefaultIVSStreams - Label: default: "Create Location and Personalised Offers resources" Parameters: - DeployLocationServices - DeployPersonalizedOffersCampaign - Label: default: "Amazon Pay (optional)" Parameters: - AmazonPayStoreId - AmazonPayMerchantId - AmazonPayPublicKeyId - AmazonPayPrivateKey - Label: default: "Alexa Convenience Store Demo" Parameters: - AlexaSkillId - AlexaDefaultSandboxEmail - Label: default: "Optional Integrations" Parameters: - AmplitudeApiKey - OptimizelySdkKey - IncludeSegmentDependencies - SegmentWriteKey - IncludemParticleDependencies - mParticleOrgId - mParticleApiKey - mParticleSecretKey - mParticleS2SApiKey - mParticleS2SSecretKey - GoogleAnalyticsMeasurementId - Label: default: "Fenix Commerce EDD Integration" Parameters: - FenixZipDetectUrl - FenixTenantId - FenixEddEndpoint - FenixMonetaryValue - FenixEnabledPdp - FenixEnabledCart - FenixEnabledCheckout - FenixXapiKey ParameterLabels: ResourceBucket: default: "Deployment Resources Staging Bucket Name (required)" ResourceBucketRelativePath: default: "Deployment Resources Staging Bucket Relative Path (optional)" CreateOpenSearchServiceLinkedRole: default: "Create OpenSearch Service Role?" SourceDeploymentType: default: "Deployment Type" GitHubRepo: default: "GitHub Repository Name (required)" GitHubBranch: default: "GitHub Branch (required)" GitHubUser: default: "GitHub Username (required)" GitHubToken: default: "GitHub Personal Access Token (optional)" PreIndexOpenSearch: default: "Auto-Load OpenSearch Index" PreCreatePersonalizeResources: default: "Auto-Build Personalize Resources" PreCreatePinpointWorkshop: default: "Auto-Configure Pinpoint" PinpointEmailFromAddress: default: "Reply-To email address" PinpointEmailFromName: default: "Reply-To name" PinpointSMSLongCode: default: "Pinpoint SMS long code" UseDefaultIVSStreams: default: "Use default IVS streams" DeployLocationServices: default: "Deploy Location Services resources" DeployPersonalizedOffersCampaign: default: "Deploy personalized offers and pickup notices using Location Services geofencing" AmplitudeApiKey: default: "Amplitude API Key" OptimizelySdkKey: default: "Optimizely SDK Key" AmazonPayStoreId: default: "Store ID of Amazon Pay sandbox account" AmazonPayMerchantId: default: "Merchant ID of Amazon Pay sandbox account" AmazonPayPublicKeyId: default: "Public key ID associated with Amazon Pay sandbox account" AmazonPayPrivateKey: default: "Private key associated with Amazon Pay sandbox account" AlexaSkillId: default: "ID of C-Store Demo Alexa skill to access Retail Demo Store" AlexaDefaultSandboxEmail: default: "An email to test Alexa integration in case you have not set up Cognito authorisation to link your Retail Demo Store account" IncludeSegmentDependencies: default: "Deploy Segment Resources" SegmentWriteKey: default: "Segment Write Key" IncludemParticleDependencies: default: "Deploy mParticle Resources" mParticleOrgId: default: "mParticle Org Id" mParticleApiKey: default: "mParticle event API Key" mParticleSecretKey: default: "mParticle event api Secret Key" mParticleS2SApiKey: default: "mParticle server to server API Key" mParticleS2SSecretKey: default: "mParticle server to server Secret Key" GoogleAnalyticsMeasurementId: default: "Google Analytics Measurement Id" FenixZipDetectUrl: default: "Fenix Zipcode Detect URL" FenixTenantId: default: "Fenix Commerce Tenant Id" FenixEddEndpoint: default: "Fenix Commerce API End Point" FenixMonetaryValue: default: "Fenix Commerce default monetary value" FenixEnabledPdp: default: "Fenix Commerce enable EDD on PDP" FenixEnabledCart: default: "Fenix Commerce enable EDD on CART" FenixEnabledCheckout: default: "Fenix Commerce enable EDD on Checkoutpage" FenixXapiKey: default: "Fenix Commerce X-Api-Key" Parameters: ResourceBucket: Type: String Description: > S3 bucket name where the Retail Demo Store deployment resources are staged (product images, nested CloudFormation templates, source code snapshot, notebooks, deployment Lambda code, etc). ResourceBucketRelativePath: Type: String Description: > Optional path in the Deployment Resources Staging bucket where the deployment resources are stored (e.g. path/path2/). Leave blank if resources are at the root of the Staging Resource Bucket. If specified, MUST end with '/'. CreateOpenSearchServiceLinkedRole: Type: String Description: > If your account already has an IAM Role named 'AWSServiceRoleForAmazonOpenSearchService', select 'No'. Otherwise, select 'Yes' and one will be created. AllowedValues: - "Yes" - "No" Default: "Yes" SourceDeploymentType: Type: String Description: > The Retail Demo Store deployment includes a CodePipeline configuration that will build and deploy Retail Demo Store microservices to ECS when a change is detected in the source repository. The source repository for CodePipeline can be configured to use your personal GitHub repository or CodeCommit. Use GitHub if you're actively developing against Retail Demo Store in your own fork. CodeCommit is useful when you just want to get up and going quickly for a demo or evaluation or for workshop scenarios, such as Event Engine, where you want attendees to have their own source repositories provisioned. AllowedValues: - "GitHub" - "CodeCommit" Default: "CodeCommit" GitHubRepo: Type: String Description: Name of Retail Demo Store GitHub repository. Will almost always be 'retail-demo-store'. Default: retail-demo-store GitHubBranch: Type: String Description: Name of GitHub branch within the GitHub repository to link to this Retail Demo Store deployment. Default: master GitHubUser: Type: String Description: If you are linking and deploying from a fork of the Retail Demo Store repository, enter your GitHub username. Otherwise, use the default of 'aws-samples' to link to the upstream repository. Default: aws-samples GitHubToken: Type: String Description: > If you are linking and deploying from a private fork of the Retail Demo Store repository in your GitHub account, a GitHub Personal Access Token is required. Otherwise, leave blank. Be sure that your token has the "repo", "repo:status", and "admin:repo_hook" permission scopes. NoEcho: true PreIndexOpenSearch: Type: String Description: > Automatically index the Retail Demo Store products in OpenSearch. Otherwise, select 'No' if you would prefer to complete this process yourself by stepping through the Search workshop included in this deployment as a Jupyter notebook in SageMaker. AllowedValues: - "Yes" - "No" Default: "No" PreCreatePersonalizeResources: Type: String Description: > Automatically trigger the background creation of Amazon Personalize resources such as solutions, campaigns, and recommenders at deployment time. Otherwise, select 'No' if you would prefer to complete this process yourself by stepping through the Personalization workshops included in this deployment. Note that the background create process runs after deployment finishes and can take 2+ hours to complete. AllowedValues: - "Yes" - "No" Default: "No" PreCreatePinpointWorkshop: Type: String Description: > Automatically configure Pinpoint with messaging templates, segments, and campaigns. Otherwise, select 'No' if you would prefer to complete this process yourself by stepping through the Messaging workshop included in your deployment as a Jupyter notebook in SageMaker. Note that this option is dependent on Auto-Build Personalize Campaigns being enabled AND completed. AllowedValues: - "Yes" - "No" Default: "No" PinpointEmailFromAddress: Type: String Description: > Email address to use as Reply-To when sending emails from Pinpoint. This parameter is required when 'Auto-Configure Pinpoint' is set to 'Yes'. PinpointEmailFromName: Type: String Description: > Name to use with Reply-To email address when sending emails from Pinpoint. This parameter only applies when 'Auto-Configure Pinpoint' is set to 'Yes'. Default: "AWS Retail Demo Store" UseDefaultIVSStreams: Type: String Description: > Whether to create and use the default Interactive Video Service (IVS) streams hosted by AWS. If 'No', then new IVS streams will be created and streams created based on any videos placed in the CloudFormation resource bucket. IMPORTANT: IVS is currently only supported in the N. Virginia (us-east-1), Oregon (us-west-2), and Ireland (eu-west-1) regions. If deploying to an unsupported region, be sure to select 'Yes' for this parameter. AllowedValues: - "Yes" - "No" Default: "Yes" PinpointSMSLongCode: Type: String Description: > A dedicated long code (i.e. a phone number) obtained for Amazon Pinpoint to send and receive messages at. Be sure to enable two way SMS for this long code using Pinpoint. Follow steps 2 and 3 in the Messaging workshop(https://github.com/aws-samples/retail-demo-store/blob/master/workshop/4-Messaging/4.1-Pinpoint.ipynb) to get a long code. This parameter only applies when 'Auto-Configure Pinpoint' is set to 'Yes'. Enter the number along with the country code and without any spaces or brackets. For Example: enter "+1XXXXXXXXXX" for a long code based in the United States. AmplitudeApiKey: Type: String Description: Amplitude API key for integrated product analytics and A/B testing results (optional). NoEcho: true OptimizelySdkKey: Type: String Description: Optimizely SDK key for experimentation (optional). NoEcho: true DeployLocationServices: Type: String Description: Deploy any Location Resources AllowedValues: - "Yes" - "No" Default: "Yes" DeployPersonalizedOffersCampaign: Type: String Description: Deploy personalized offers and pickup notices using Location Services geofencing AllowedValues: - "Yes" - "No" Default: "Yes" AmazonPayPublicKeyId: Type: String Description: > This demonstration store contains an example of signing Amazon Pay payloads for integration with an Amazon Pay sandbox. This parameter is the Public Key ID for the Amazon Pay sandbox account being used. For more information see "Amazon Pay Integration" under the README file in the amazon-pay-signing subfolder in the repository. AmazonPayStoreId: Type: String Description: > The Store ID of the Amazon Pay sandbox account being used. For more information see "Amazon Pay Integration" under the README file in the amazon-pay-signing subfolder in the repository. AmazonPayMerchantId: Type: String Description: > Merchant ID of the Amazon Pay sandbox account being used. For more information see "Amazon Pay Integration" under the README file in the amazon-pay-signing subfolder in the repository. AmazonPayPrivateKey: Type: String Description: > The private key to be used for signing Amazon Pay requests for a sandbox account. You will need to copy the whole contents of the .pem file into this parameter. For more information see "Amazon Pay Integration" under the README file in the amazon-pay-signing subfolder in the repository. NoEcho: true AlexaSkillId: Type: String Description: > This Alexa skill with this SkillId will be allowed to invoke the back-end skill Lambda deployed as a part of this CloudFormation stack. The back-end Lambda supports the C-Store demo allowing hands-free location based searching with Location Service (if enabled), integration with the Retail Demo Store back-end, online recommendations, and checkout. AlexaDefaultSandboxEmail: Type: String Description: > Fallback email address to receive order confirmation emails. This will be used until the steps are followed to enable Alexa to authenticate with Cognito, after which it will be able to retrieve the user's details. IncludeSegmentDependencies: Type: String Description: > Whether to deploy the resources required for the Segment workshops. AllowedValues: - "Yes" - "No" Default: "No" SegmentWriteKey: Type: String Description: > Segment write key for real-time data collection (optional). Be sure the Segment resources are deployed (above) if you specify a write key. NoEcho: true IncludemParticleDependencies: Type: String Description: > Whether to deploy the resources required for the mParticle workshops. AllowedValues: - 'Yes' - 'No' Default: 'No' mParticleOrgId: Type: String Description: > mParticle organization ID from your workspace. NoEcho: true mParticleApiKey: Type: String Description: > mParticle event API Key for your mParticle tenant. NoEcho: true mParticleSecretKey: Type: String Description: > mParticle event API secret key coupled with your API key. NoEcho: true mParticleS2SApiKey: Type: String Description: > mParticle server to server API Key for your mParticle tenant. NoEcho: true mParticleS2SSecretKey: Type: String Description: > mParticle server to server secret key coupled with your API key. NoEcho: true GoogleAnalyticsMeasurementId: Type: String Description: > Google Analytics Measurement Identifier (optional). If specified, the Google Analytics integration in the web application is activated and events are sent to the data stream associated with the Measurement ID. FenixZipDetectUrl: Type: String Description: Fenix Commerce Zipcode Detect URL Default: 'https://ipapi.co/json?key=cKGC3jQbSIoXYmI2KtXObugsKfosD9Yr0HnkHhPUu1SM2wQhE0' FenixTenantId: Type: String Description: Fenix Commerce Demo Env TenantID Default: 'ec6ea3439489426ba09cf6c906ead8d5' NoEcho: true FenixEddEndpoint: Type: String Description: Fenix Commerce Estimated Delivery Date Endpoint URL Default: 'https://platform.api.fenixcommerce.com/awsretaildemostore/fenixdelest/api/v2/deliveryestimates' FenixMonetaryValue: Type: String Description: Fenix Commerce Default monetary value to control free shipping above $100. Default: 100 FenixEnabledPdp: Type: String Description: Fenix Commerce Flag to enable display of Estimated Delivery Date (EDD) on PDP. OFF/FALSE by default AllowedValues: - 'TRUE' - 'FALSE' Default: 'FALSE' FenixEnabledCart: Type: String Description: Fenix Commerce Flag to enable EDD on CART Page AllowedValues: - 'TRUE' - 'FALSE' Default: 'FALSE' FenixEnabledCheckout: Type: String Description: Fenix Commerce Flag to enable EDD on checkout Page AllowedValues: - 'TRUE' - 'FALSE' Default: 'FALSE' FenixXapiKey: Type: String Description: Fenix Commerce Demo Env x-api-key Default: 'nr50Qdu7FM94n2X1GYuhA8cFzyvdYTJ5Qka4XMOd' NoEcho: true Conditions: DeploySegmentResources: !Equals - !Ref IncludeSegmentDependencies - "Yes" DeploymParticleResources: !Equals - !Ref IncludemParticleDependencies - 'Yes' DeployLocationStack: !Equals - !Ref DeployLocationServices - "Yes" CreateAmazonPayResources: !And - !And - !Not [!Equals [!Ref AmazonPayPrivateKey, ""]] - !Not [!Equals [!Ref AmazonPayStoreId, ""]] - !And - !Not [!Equals [!Ref AmazonPayMerchantId, ""]] - !Not [!Equals [!Ref AmazonPayPublicKeyId, ""]] DeployAlexaEndpoint: !Not [!Equals [!Ref AlexaSkillId, ""]] Resources: # Base Resources Base: Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub https://s3.amazonaws.com/${ResourceBucket}/${ResourceBucketRelativePath}cloudformation-templates/base/_template.yaml Parameters: ResourceBucket: !Ref ResourceBucket ResourceBucketRelativePath: !Ref ResourceBucketRelativePath SourceDeploymentType: !Ref SourceDeploymentType CreateOpenSearchServiceLinkedRole: !Ref CreateOpenSearchServiceLinkedRole CleanupBucketLambdaArn: !GetAtt CleanupBucket.Outputs.LambdaFunctionArn AmplitudeApiKey: !Ref AmplitudeApiKey ParentStackName: !Ref AWS::StackName OptimizelySdkKey: !Ref OptimizelySdkKey SegmentWriteKey: !Ref SegmentWriteKey mParticleOrgId: !Ref mParticleOrgId mParticleApiKey: !Ref mParticleApiKey mParticleSecretKey: !Ref mParticleSecretKey mParticleS2SApiKey: !Ref mParticleS2SApiKey mParticleS2SSecretKey: !Ref mParticleS2SSecretKey PinpointSMSLongCode: !Ref PinpointSMSLongCode GoogleAnalyticsMeasurementId: !Ref GoogleAnalyticsMeasurementId LocationResourcePrefix: !Ref AWS::StackName GitHubUser: !Ref GitHubUser GitHubBranch: !Ref GitHubBranch FenixZipDetectUrl: !Ref FenixZipDetectUrl FenixTenantId: !Ref FenixTenantId FenixEddEndpoint: !Ref FenixEddEndpoint FenixMonetaryValue: !Ref FenixMonetaryValue FenixEnabledPdp: !Ref FenixEnabledPdp FenixEnabledCart: !Ref FenixEnabledCart FenixEnabledCheckout: !Ref FenixEnabledCheckout FenixXapiKey: !Ref FenixXapiKey # Services Resources Services: Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub https://s3.amazonaws.com/${ResourceBucket}/${ResourceBucketRelativePath}cloudformation-templates/services/_template.yaml Parameters: ResourceBucket: !Ref ResourceBucket ResourceBucketRelativePath: !Ref ResourceBucketRelativePath SourceDeploymentType: !Ref SourceDeploymentType GitHubRepo: !Ref GitHubRepo GitHubBranch: !Ref GitHubBranch GitHubToken: !Ref GitHubToken GitHubUser: !Ref GitHubUser UserPoolId: !GetAtt Base.Outputs.UserPoolId UserPoolClientId: !GetAtt Base.Outputs.UserPoolClientId IdentityPoolId: !GetAtt Base.Outputs.IdentityPoolId StackBucketName: !GetAtt Base.Outputs.StackBucketName Subnets: !GetAtt Base.Outputs.Subnets VpcId: !GetAtt Base.Outputs.VpcId VpcCidr: !GetAtt Base.Outputs.VpcCidr ClusterName: !GetAtt Base.Outputs.ClusterName ServiceDiscoveryNamespace: !GetAtt Base.Outputs.ServiceDiscoveryNamespace EnvOpenSearchDomainEndpoint: !GetAtt Base.Outputs.OpenSearchDomainEndpoint PinpointAppId: !GetAtt Base.Outputs.PinpointAppId ProductsTable: !GetAtt Base.Outputs.ProductsTable CategoriesTable: !GetAtt Base.Outputs.CategoriesTable ExperimentStrategyTable: !GetAtt Base.Outputs.ExperimentStrategyTable ParameterPersonalizeEventTrackerId: !GetAtt Base.Outputs.ParameterPersonalizeEventTrackerId ParameterAmplitudeApiKey: !GetAtt Base.Outputs.ParameterAmplitudeApiKey ParameterOptimizelySdkKey: !GetAtt Base.Outputs.ParameterOptimizelySdkKey CleanupBucketLambdaArn: !GetAtt CleanupBucket.Outputs.LambdaFunctionArn ParameterIVSVideoChannelMap: !GetAtt Base.Outputs.ParameterIVSVideoChannelMap WebRootUrl: !GetAtt Base.Outputs.WebUICDNURL UseDefaultIVSStreams: !Ref UseDefaultIVSStreams ImageRootUrl: !Sub - "${RootURL}/images/" - RootURL: !GetAtt Base.Outputs.WebUICDNURL ParentStackName: !Ref AWS::StackName EvidentlyProjectName: !GetAtt Base.Outputs.EvidentlyProjectName LoggingBucketName: !GetAtt Base.Outputs.LoggingBucketName LambdaVpcSecurityGroup: !GetAtt Base.Outputs.PrivateVPCSecurityGroup # Services Resources ApiGateway: Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub https://s3.amazonaws.com/${ResourceBucket}/${ResourceBucketRelativePath}cloudformation-templates/apigateway.yaml Parameters: ProductsServiceELBListener: !GetAtt Services.Outputs.ProductsServiceELBListener UsersServiceELBListener: !GetAtt Services.Outputs.UsersServiceELBListener CartsServiceELBListener: !GetAtt Services.Outputs.CartsServiceELBListener OrdersServiceELBListener: !GetAtt Services.Outputs.OrdersServiceELBListener RecommendationsServiceELBListener: !GetAtt Services.Outputs.RecommendationsServiceELBListener VideosServiceELBListener: !GetAtt Services.Outputs.VideosServiceELBListener SearchServiceELBListener: !GetAtt Services.Outputs.SearchServiceELBListener LocationServiceELBListener: !GetAtt Services.Outputs.LocationServiceELBListener Subnets: !GetAtt Base.Outputs.Subnets VpcId: !GetAtt Base.Outputs.VpcId VpcCidr: !GetAtt Base.Outputs.VpcCidr ResourceBucket: !Ref ResourceBucket ResourceBucketRelativePath: !Ref ResourceBucketRelativePath CognitoUserPoolId: !GetAtt Base.Outputs.UserPoolId CognitoAppClientId: !GetAtt Base.Outputs.UserPoolClientId # Web UI Pipeline WebUIPipeline: Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub https://s3.amazonaws.com/${ResourceBucket}/${ResourceBucketRelativePath}cloudformation-templates/web-ui-pipeline.yaml Parameters: ResourceBucket: !Ref ResourceBucket ResourceBucketRelativePath: !Ref ResourceBucketRelativePath SourceDeploymentType: !Ref SourceDeploymentType GitHubRepo: !Ref GitHubRepo GitHubBranch: !Ref GitHubBranch GitHubToken: !Ref GitHubToken GitHubUser: !Ref GitHubUser AmazonPayMerchantId: !Ref AmazonPayMerchantId AmazonPayPublicKeyId: !Ref AmazonPayPublicKeyId AmazonPayStoreId: !Ref AmazonPayStoreId UserPoolId: !GetAtt Base.Outputs.UserPoolId UserPoolClientId: !GetAtt Base.Outputs.UserPoolClientId IdentityPoolId: !GetAtt Base.Outputs.IdentityPoolId APIGatewayUrl: !GetAtt ApiGateway.Outputs.APIEndpoint PinpointAppId: !GetAtt Base.Outputs.PinpointAppId ParameterPersonalizeEventTrackerId: !GetAtt Base.Outputs.ParameterPersonalizeEventTrackerId FenixZipDetectUrl: !Ref FenixZipDetectUrl FenixTenantId: !Ref FenixTenantId FenixEddEndpoint: !Ref FenixEddEndpoint FenixMonetaryValue: !Ref FenixMonetaryValue FenixEnabledPdp: !Ref FenixEnabledPdp FenixEnabledCart: !Ref FenixEnabledCart FenixEnabledCheckout: !Ref FenixEnabledCheckout FenixXapiKey: !Ref FenixXapiKey LocationResourceName: !If [ DeployLocationStack, !GetAtt Location.Outputs.LocationResourceName, "NotDeployed", ] LocationNotificationEndpoint: !If [ DeployLocationStack, !GetAtt Location.Outputs.LocationNotificationEndpoint, "NotDeployed", ] ParameterAmplitudeApiKey: !GetAtt Base.Outputs.ParameterAmplitudeApiKey ParameterOptimizelySdkKey: !GetAtt Base.Outputs.ParameterOptimizelySdkKey ParameterSegmentWriteKey: !GetAtt Base.Outputs.ParameterSegmentWriteKey ParameterGoogleAnalyticsMeasurementId: !GetAtt Base.Outputs.ParameterGoogleAnalyticsMeasurementId CleanupBucketLambdaArn: !GetAtt CleanupBucket.Outputs.LambdaFunctionArn WebUICDN: !GetAtt Base.Outputs.WebUICDN WebUIBucketName: !GetAtt Base.Outputs.WebUIBucketName WebRootUrl: !GetAtt Base.Outputs.WebUICDNURL ImageRootUrl: !Sub - "${RootURL}/images/" - RootURL: !GetAtt Base.Outputs.WebUICDNURL LoggingBucketName: !GetAtt Base.Outputs.LoggingBucketName # Swagger UI Pipeline SwaggerUIPipeline: Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub https://s3.amazonaws.com/${ResourceBucket}/${ResourceBucketRelativePath}cloudformation-templates/swagger-ui-pipeline.yaml Parameters: ResourceBucket: !Ref ResourceBucket ResourceBucketRelativePath: !Ref ResourceBucketRelativePath SwaggerUICDN: !GetAtt Base.Outputs.SwaggerUICDN SwaggerUIBucketName: !GetAtt Base.Outputs.SwaggerUIBucketName SwaggerUIRootUrl: !GetAtt Base.Outputs.SwaggerUICDNURL SourceDeploymentType: !Ref SourceDeploymentType GitHubRepo: !Ref GitHubRepo GitHubBranch: !Ref GitHubBranch GitHubToken: !Ref GitHubToken GitHubUser: !Ref GitHubUser ProductsServiceExternalUrl: !GetAtt ApiGateway.Outputs.APIEndpoint UsersServiceExternalUrl: !GetAtt ApiGateway.Outputs.APIEndpoint CartsServiceExternalUrl: !GetAtt ApiGateway.Outputs.APIEndpoint OrdersServiceExternalUrl: !GetAtt ApiGateway.Outputs.APIEndpoint RecommendationsServiceExternalUrl: !GetAtt ApiGateway.Outputs.APIEndpoint SearchServiceExternalUrl: !GetAtt ApiGateway.Outputs.APIEndpoint VideosServiceExternalUrl: !GetAtt ApiGateway.Outputs.APIEndpoint LocationServiceExternalUrl: !GetAtt ApiGateway.Outputs.APIEndpoint OffersServiceExternalUrl: !GetAtt ApiGateway.Outputs.APIEndpoint CleanupBucketLambdaArn: !GetAtt CleanupBucket.Outputs.LambdaFunctionArn LoggingBucketName: !GetAtt Base.Outputs.LoggingBucketName # Lex personalization function ChatbotFunctions: Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub https://s3.amazonaws.com/${ResourceBucket}/${ResourceBucketRelativePath}cloudformation-templates/lex.yaml Parameters: ResourceBucket: !Ref ResourceBucket ResourceBucketRelativePath: !Ref ResourceBucketRelativePath UsersServiceExternalUrl: !GetAtt Services.Outputs.UsersServiceUrl RecommendationsServiceExternalUrl: !GetAtt Services.Outputs.RecommendationsServiceUrl LambdaVpcSecurityGroup: !GetAtt Base.Outputs.PrivateVPCSecurityGroup LambdaVpcSubnets: !GetAtt Base.Outputs.Subnets # Amazon Location Resources Location: Type: AWS::CloudFormation::Stack Condition: DeployLocationStack Properties: TemplateURL: !Sub https://s3.amazonaws.com/${ResourceBucket}/${ResourceBucketRelativePath}cloudformation-templates/location.yaml Parameters: ResourceBucket: !Ref ResourceBucket ResourceBucketRelativePath: !Ref ResourceBucketRelativePath UserPoolId: !GetAtt Base.Outputs.UserPoolId DeployDefaultGeofence: !Ref DeployPersonalizedOffersCampaign PinpointAppId: !GetAtt Base.Outputs.PinpointAppId PinpointEmailFromAddress: !Ref PinpointEmailFromAddress ProductsServiceExternalUrl: !GetAtt Services.Outputs.ProductsServiceUrl CartsServiceExternalUrl: !GetAtt Services.Outputs.CartsServiceUrl OrdersServiceExternalUrl: !GetAtt Services.Outputs.OrdersServiceUrl OffersServiceExternalUrl: !GetAtt Services.Outputs.OffersServiceUrl UsersServiceExternalUrl: !GetAtt Services.Outputs.UsersServiceUrl WebURL: !GetAtt Base.Outputs.WebUICDNURL LambdaVpcSecurityGroup: !GetAtt Base.Outputs.PrivateVPCSecurityGroup LambdaVpcSubnets: !GetAtt Base.Outputs.Subnets AmazonPay: Type: AWS::CloudFormation::Stack Condition: CreateAmazonPayResources Properties: TemplateURL: !Sub https://s3.amazonaws.com/${ResourceBucket}/${ResourceBucketRelativePath}cloudformation-templates/amazonpay.yaml Parameters: ResourceBucket: !Ref ResourceBucket ResourceBucketRelativePath: !Ref ResourceBucketRelativePath AmazonPayPublicKeyId: !Ref AmazonPayPublicKeyId AmazonPayStoreId: !Ref AmazonPayStoreId AmazonPayPrivateKey: !Ref AmazonPayPrivateKey WebURL: !GetAtt Base.Outputs.WebUICDNURL Alexa: Type: AWS::CloudFormation::Stack Condition: DeployAlexaEndpoint Properties: TemplateURL: !Sub https://s3.amazonaws.com/${ResourceBucket}/${ResourceBucketRelativePath}cloudformation-templates/alexa.yaml Parameters: AlexaSkillId: !Ref AlexaSkillId PinpointAppId: !GetAtt Base.Outputs.PinpointAppId ResourceBucket: !Ref ResourceBucket ResourceBucketRelativePath: !Ref ResourceBucketRelativePath ProductsServiceExternalUrl: !GetAtt Services.Outputs.ProductsServiceUrl LocationServiceExternalUrl: !GetAtt Services.Outputs.LocationServiceUrl OrdersServiceExternalUrl: !GetAtt Services.Outputs.OrdersServiceUrl CartsServiceExternalUrl: !GetAtt Services.Outputs.CartsServiceUrl RecommendationsServiceExternalUrl: !GetAtt Services.Outputs.RecommendationsServiceUrl LocationResourceName: !If [ DeployLocationStack, !GetAtt Location.Outputs.LocationResourceName, "NotDeployed", ] AlexaDefaultSandboxEmail: !Ref AlexaDefaultSandboxEmail LambdaVpcSecurityGroup: !GetAtt Base.Outputs.PrivateVPCSecurityGroup LambdaVpcSubnets: !GetAtt Base.Outputs.Subnets # Deployment support DeploymentSupport: DependsOn: [Services, Base] # Delay towards end of deployment so that ES domain and DNS changes become consistent Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub https://s3.amazonaws.com/${ResourceBucket}/${ResourceBucketRelativePath}cloudformation-templates/deployment-support.yaml Parameters: ResourceBucket: !Ref ResourceBucket ResourceBucketRelativePath: !Ref ResourceBucketRelativePath PreIndexOpenSearch: !Ref PreIndexOpenSearch PreCreatePersonalizeResources: !Ref PreCreatePersonalizeResources Subnet1: !GetAtt Base.Outputs.Subnet1 Subnet2: !GetAtt Base.Outputs.Subnet2 OpenSearchSecurityGroupId: !GetAtt Base.Outputs.OpenSearchSecurityGroupId OpenSearchDomainArn: !GetAtt Base.Outputs.OpenSearchDomainArn OpenSearchDomainEndpoint: !GetAtt Base.Outputs.OpenSearchDomainEndpoint ParameterIVSVideoChannelMap: !GetAtt Base.Outputs.ParameterIVSVideoChannelMap PreCreatePinpointWorkshop: !Ref PreCreatePinpointWorkshop Uid: !Sub ${AWS::StackName}-${AWS::Region} PinpointAppId: !GetAtt Base.Outputs.PinpointAppId PinpointPersonalizeRoleArn: !GetAtt Services.Outputs.PinpointPersonalizeRoleArn CustomizeRecommendationsFunctionArn: !GetAtt Services.Outputs.CustomizeRecommendationsFunctionArn CustomizeOffersRecommendationsFunctionArn: !GetAtt Services.Outputs.CustomizeOffersRecommendationsFunctionArn PinpointEmailFromAddress: !Ref PinpointEmailFromAddress PinpointEmailFromName: !Ref PinpointEmailFromName UseDefaultIVSStreams: !Ref UseDefaultIVSStreams ProductsServiceExternalUrl: !GetAtt Services.Outputs.ProductsServiceUrl DeployPersonalizedOffersCampaign: !Ref DeployPersonalizedOffersCampaign PersonalizeRoleArn: !GetAtt Base.Outputs.PersonalizeRoleArn # Cleanup bucket function CleanupBucket: Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub https://s3.amazonaws.com/${ResourceBucket}/${ResourceBucketRelativePath}cloudformation-templates/cleanup-bucket.yaml # Segment Lambda Functions and Roles SegmentPersonalize: Condition: DeploySegmentResources Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub https://s3.amazonaws.com/${ResourceBucket}/${ResourceBucketRelativePath}cloudformation-templates/segment.yaml Parameters: ResourceBucket: !Ref ResourceBucket ResourceBucketRelativePath: !Ref ResourceBucketRelativePath LambdaVpcSecurityGroup: !GetAtt Base.Outputs.PrivateVPCSecurityGroup LambdaVpcSubnets: !GetAtt Base.Outputs.Subnets # mParticle Lambda Functions Kinesis and Roles mParticlePersonalize: Condition: DeploymParticleResources Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub https://s3.amazonaws.com/${ResourceBucket}/${ResourceBucketRelativePath}cloudformation-templates/mparticle.yaml Parameters: ResourceBucket: !Ref ResourceBucket ResourceBucketRelativePath: !Ref ResourceBucketRelativePath mParticleOrgId: !Ref mParticleOrgId Uid: !Sub ${AWS::StackName}-${AWS::Region} LambdaVpcSecurityGroup: !GetAtt Base.Outputs.PrivateVPCSecurityGroup LambdaVpcSubnets: !GetAtt Base.Outputs.Subnets Outputs: UserPoolId: Description: Authentication Cognito User Pool Id. Value: !GetAtt Base.Outputs.UserPoolId UserPoolClientId: Description: Authentication Cognito User Pool Client Id. Value: !GetAtt Base.Outputs.UserPoolClientId IdentityPoolId: Description: Authentication Cognito Identity Pool Id. Value: !GetAtt Base.Outputs.IdentityPoolId BucketStackBucketName: Description: Stack Bucket Name Value: !GetAtt Base.Outputs.StackBucketName NotebookInstanceId: Description: Notebook Instance Id. Value: !GetAtt Base.Outputs.NotebookInstanceId VpcId: Description: VPC Id. Value: !GetAtt Base.Outputs.VpcId Subnets: Description: Service Subnets. Value: !GetAtt Base.Outputs.Subnets ClusterName: Description: ECS Cluster Name. Value: !GetAtt Base.Outputs.ClusterName WebURL: Description: Retail Demo Store Web UI URL Value: !GetAtt Base.Outputs.WebUICDNURL OpenSearchDomainEndpoint: Description: OpenSearch Endpoint Value: !GetAtt Base.Outputs.OpenSearchDomainEndpoint ParameterIVSVideoChannelMap: Description: Retail Demo Store video file to IVS channel mapping parameter Value: !GetAtt Base.Outputs.ParameterIVSVideoChannelMap PinpointAppId: Description: Pinpoint App Id. Value: !GetAtt Base.Outputs.PinpointAppId AlexaSkillEndpointArn: Description: Arn of AWS Lambda function that can be a back-end Value: !If [DeployAlexaEndpoint, !GetAtt Alexa.Outputs.AlexaSkillEndpointArn, "NotDeployed"] ProductsServiceUrl: Description: Products load balancer URL. Value: !GetAtt Services.Outputs.ProductsServiceUrl UsersServiceUrl: Description: Users load balancer URL. Value: !GetAtt Services.Outputs.UsersServiceUrl CartsServiceUrl: Description: Carts load balancer URL. Value: !GetAtt Services.Outputs.CartsServiceUrl OrdersServiceUrl: Description: Orders load balancer URL. Value: !GetAtt Services.Outputs.OrdersServiceUrl LocationServiceUrl: Description: Location load balancer URL. Value: !GetAtt Services.Outputs.LocationServiceUrl RecommendationsServiceUrl: Description: Recommendations load balancer URL. Value: !GetAtt Services.Outputs.RecommendationsServiceUrl VideosServiceUrl: Description: Videos load balancer URL. Value: !GetAtt Services.Outputs.VideosServiceUrl SearchServiceUrl: Description: Search load balancer URL. Value: !GetAtt Services.Outputs.SearchServiceUrl OffersServiceUrl: Description: Offers service load balancer URL. Value: !GetAtt Services.Outputs.OffersServiceUrl APIEndpoint: Value: !GetAtt ApiGateway.Outputs.APIEndpoint EvidentlyProjectName: Description: ARN for the CloudWatch Evidently project Value: !GetAtt Base.Outputs.EvidentlyProjectName ExportEnvVarScript: Description: A script to export all required environment variable for running docker-compose locally, but connecting to Cloud resources. Replace the existing .env file with this output. Value: !Sub | # Products service DDB_TABLE_PRODUCTS=${Base.Outputs.ProductsTable} DDB_TABLE_CATEGORIES=${Base.Outputs.CategoriesTable} IMAGE_ROOT_URL="${Base.Outputs.WebUICDNURL}/images/" WEB_ROOT_URL="${Base.Outputs.WebUICDNURL}" # Recommendations service PRODUCT_SERVICE_HOST="${ApiGateway.Outputs.APIEndpoint}" OFFERS_SERVICE_HOST="${ApiGateway.Outputs.APIEndpoint}" AWS_XRAY_DAEMON_ADDRESS=xray:2000 # Search service OPENSEARCH_DOMAIN_SCHEME=https OPENSEARCH_DOMAIN_HOST="${Base.Outputs.OpenSearchDomainEndpoint}" OPENSEARCH_DOMAIN_PORT=9200 # Evidently EVIDENTLY_PROJECT_NAME="${Base.Outputs.EvidentlyProjectName}" # Users service AWS_REGION=${AWS::Region} # Locations service RESOURCE_BUCKET=${ResourceBucket} AWS_DEFAULT_REGION=${AWS::Region} # Videos service PARAMETER_IVS_VIDEO_CHANNEL_MAP=${Base.Outputs.ParameterIVSVideoChannelMap} USE_DEFAULT_IVS_STREAMS=true