Skip to content

Commit

Permalink
Delivery Amazon Location Service Integration (aws-samples#162)
Browse files Browse the repository at this point in the history
* Signup changes (aws-samples#86)

* Add optimizely container params (aws-samples#82)

* added optimizely sdk key param to containers

* logging add

* pprint

* ssm:GetParameters to task exec role

* rename ssm policy for execution role

* removed debug logging

* resource_bucket_path in CopyImagesLambdaFunction (aws-samples#84)

* Bump selfsigned version for node-forge vuln

* remove phone number field from signUp form

* Update the READMEs and instructions to reflect changes in signup

Co-authored-by: Igor Krtolica <[email protected]>
Co-authored-by: Bastien <[email protected]>
Co-authored-by: James Jory <[email protected]>

* fix aws-samples#87 by running npm audit fix

* AWS Interactive Video Service (IVS) Demo addition to the retail demo. Summary as follow:
* IVS: Addition of IVS container, IVS cloud formation.
* UI: Adding UI Tab and page for the streams, its products, recommendations and discounts.
* UI: Adding Reset Amazon Personalize button on the user profile.
* UI: Refactoring for the menu.
* Amazon Personalize: Addition of new campaign for discounts, update to the container service code.
* Amazon Personalize: Additional Jupyter notebook, remove dependancy on bucket to stage data,  instead generate it from script.
* Update to the readmes and documentations.
This work was done by Dae.mn Team.
Co-authored-by: Akram Dweikat <[email protected]>
Co-authored-by: Akram Dweikat  <[email protected]>
Co-authored-by: Damien Jade Duff <[email protected]>
Co-authored-by: daemon-joe <[email protected]>

* add welcome page

* more semantic markup

* service badges

* New product detail design + ability to change quantity on product page

* Remove extra console log

* Adjust spacing

* fix hover color on quantity background

* Add text alerts UI

* Use margin over gap property

* Use margin over gap property

* fix repeated cart update bug

* Avoid v-bind if unnecessary

* New product detail design + ability to change quantity on product page

* Remove extra console log

* Adjust spacing

* fix hover color on quantity background

* Use margin over gap property

* fix repeated cart update bug

* Shift responsibilities to Layout component

* Abstract out functionality into mixins

* Merge

* Updates to PR based on comments/discussions

- Scoped down on permissions for IVS and Personalize.
- Minor refactor of the recommender endpoint to clean up logic with respect to how discounts are extracted from reranking and experiment information added, to address the comment about why we have ‘old_url’ (we don’t anymore).
- Additional images and products are now using the original numbering scheme. Products are sequential in products.yaml and images are numbered per category.
- Merged a pinpoint fix from trunk (pull Arns rather than name from CloudFormation).
- Fixed a regression preventing pinpoint from accessing personalize recommendations.
- Fixed some typos.

* Protect text alerts component

* Use mixins within mixins

* Remove unneeded parameters from recommender service

* Remove optimisation about not regenerating interactions

* Enhance cart page

* only show cart summary if there are items in the cart

* formatting

* remove shipping and tax from mixin

* fix cart length check

* Fix cart item keys

* Use carousel component on product and home pages

* Adding UI button to trigger Abandoned Cart email

* Bump selfsigned version for node-forge vuln

* Pass ARNs to Pinpoint auto workshop lambda (aws-samples#90)

* user-personalization recipe (aws-samples#94)

* Event Engine support (aws-samples#99)

* Wildcard resource due to CFN case sensitivity

* Add base Event Engine template

* Shorten IAM role name

* Task role name dynamic

* Shorten PinpointPersonalize role name

* Cache campaign and solution version details (aws-samples#95)

* BugFix: Update csv path (aws-samples#97)

When using RelativeResourceBucketPath, the CSV files are not written into the root of the bucket but under the ResourceBucketRelativePath. Fixing path with this commit

* Adding UI button to trigger Abandoned Cart email

* Feature/contextual metadata discounts (aws-samples#16)

Following up on our conversations, we have moved the Personalize Discounts into using the "contextual metadata" feature to identify whether a product was being offered at a discount when it was viewed. Therefore, we use a single campaign and get different recommendations depending on the context of whether a discount is active. This will replace the previously mentioned solution. This change involves:

-Changes to training data (user-product interactions) to add the context field which will record which offer is active in the interaction (from {'DISCOUNT':'No'} and {'DISCOUNT':'Yes'})
-Remove the discounts campaign.
-Update the reranking campaign training and inference in the Lambda function that automatically trains all Personalize campaigns to take the contextual metadata (we use the reranking campaign with discounts because it allows us to “pick the top N”) (reranking also supports contextual metadata).
-Update the recommendations discounts endpoint to provide the context to Personalize.
-Update the experimentations framework to match this.
Ran unit tests.
-Workshop: We will also update the Jupyter notebook we added to show:
--How the interactions are generated.
--How the campaign is created.
--How recommendations might be retrieved from Personalize and from the endpoint.
--We also visualise to ensure that the recommender gives expected results.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This work was done by Dae.mn Team.
Co-authored-by: Akram Dweikat [email protected]
Co-authored-by: Akram Dweikat [email protected]
Co-authored-by: Damien Jade Duff [email protected]
Co-authored-by: Joe Major [email protected]

* remove index of product rendered on carousel

* Abandoned cart pushing attributes initial work

* Temporary commit

* Revert "Temporary commit"

This reverts commit dd4e803.

* Adding in product information for event

* add welcome page

* more semantic markup

* service badges

* Use margin over gap property

* Avoid v-bind if unnecessary

* Adding in explicit URL locations for website images/locations

* use vuex to track welcome page visit

* remove copy that is only sometimes relevant

* add skip login for now button

* put text alerts section behind feature flag

* Upadting text tempalte

* fix analytics following removal of cart subtotal

* put abandon shopping cart button behind feature flag while waiting for back end service

* Enhance cart page

* only show cart summary if there are items in the cart

* formatting

* remove shipping and tax from mixin

* fix cart length check

* Fix cart item keys

* fix analytics following removal of cart subtotal

* put abandon shopping cart button behind feature flag while waiting for back end service

* add back cart feature flag

* Use carousel component on product and home pages

* remove index of product rendered on carousel

* Move data globally and add new nav

* New footer

* Remove role='presentation' from search results + truncate length

* Move margins style to parent component

* Move footer to partials/

* Make layout padding-top condition based on showNav

* Remove unnecessary breakpoint declaration

* Remove categories navigation from CategoryDetail page

* Updating UI conditional view and workshop books

* Fixing typos and grammar errors

* Adding bank in tempalte loads and links to tempalte files

* Feature/merge notebooks (aws-samples#17)

Updates:

Merged the Notebook of Discounts (1.3) to the Notebook of Personalise (1.1)
Renamed delete notebook to 1.3
This work was done by Dae.mn Team.
Co-authored-by: Akram Dweikat [email protected]
Co-authored-by: Akram Dweikat [email protected]
Co-authored-by: Damien Jade Duff [email protected]
Co-authored-by: Joe Major [email protected]

* Feature/master merge 20201119 (aws-samples#18)

Update: Bring master new commits to Daemn branch 

This work was done by Dae.mn Team.
Co-authored-by: Akram Dweikat [email protected]
Co-authored-by: Akram Dweikat [email protected]
Co-authored-by: Damien Jade Duff [email protected]
Co-authored-by: Joe Major [email protected]

* Add back product stock behavior

* Refine product stock behavior

* Use dynamic titles for recommendations section

* Only show user recommendations when logged in

* use personalizeUser state to decide when to show recommendations

* fix ProductDetail logic

* fix personalizeUserId sent on search rerank

* Implement Waypoint demo, including:
  - Amazon Waypoint geofence initiated flows & logic
  - Amazon Waypoint map UI component & scenario interface
  - Store-side orders view
  - Pinpoint campaigns integration for recommendations and abandoned cart
  - Amazon Personalize for coupon offers
  - Pinpoint transactional messaging for pickups
  - In-browser notifications
  - Amazon Pay integration
  - A Jupyter notebook illustrating Waypoint and Amazon Pinpoint integration

  This work was done by Dae.mn Team.
  Co-authored-by: Akram Dweikat [email protected]
  Co-authored-by: Akram Dweikat [email protected]
  Co-authored-by: Damien Jade Duff [email protected]
  Co-authored-by: Joe Major [email protected]

* Changes as requested on PR (aws-samples#29)

Changes to PR as requested including:
- Default streams JSON pulled from S3
- Capitalisation of IVS
- Small code and doc changes
- Bump Golang version - Due to dependency update.

This work was done by Dae.mn Team.
Co-authored-by: Akram Dweikat [email protected]
Co-authored-by: Akram Dweikat [email protected]
Co-authored-by: Damien Jade Duff [email protected]
Co-authored-by: Joe Major [email protected]

* Feature/remove copier dependency (aws-samples#30)

Merge removal of copier dependency from master.

This work was done by Dae.mn Team.
Co-authored-by: Akram Dweikat [email protected]
Co-authored-by: Akram Dweikat [email protected]
Co-authored-by: Damien Jade Duff [email protected]
Co-authored-by: Joe Major [email protected]

* Resize screenshot of discounts UI for notebook (aws-samples#31)

Resize screenshot of discounts UI for notebook
 
This work was done by Dae.mn Team.
 Co-authored-by: Akram Dweikat [email protected]
 Co-authored-by: Akram Dweikat [email protected]
 Co-authored-by: Damien Jade Duff [email protected]
 Co-authored-by: Joe Major [email protected]

* Pr/requested fixes (aws-samples#131)

* Move interactions generation into the right place (aws-samples#32)

This work was done by Dae.mn Team.
  Co-authored-by: Akram Dweikat [email protected]
  Co-authored-by: Akram Dweikat [email protected]
  Co-authored-by: Damien Jade Duff [email protected]
  Co-authored-by: Joe Major [email protected]

Co-authored-by: Dae.mn <[email protected]>

* Bugfix/ivs deployment flag (aws-samples#33)

Added flag to prevent CloudFormaiton deployment of IVS resources when default streams flag is set to Yes

This work was done by Dae.mn Team.
  Co-authored-by: Akram Dweikat [email protected]
  Co-authored-by: Akram Dweikat [email protected]
  Co-authored-by: Damien Jade Duff [email protected]
  Co-authored-by: Joe Major [email protected]

Co-authored-by: damien.dae.mn <[email protected]>
Co-authored-by: Dae.mn <[email protected]>

* Feature/rename to location services (aws-samples#75)

Rename Waypoint to Location Service
    ✓ Tested in deployment.
This work was done by Dae.mn Team.
Co-authored-by: Akram Dweikat [email protected]
Co-authored-by: Akram Dweikat [email protected]
Co-authored-by: Damien Jade Duff [email protected]
Co-authored-by: Joe Major [email protected]

* Improvements from PR feedback

    Scope down on location resources.
    Allow local testing with x-ray.
    Change Location stack to be conditional rather than parts.
    Optionally get long code in Location event handler
    Fix hostnames for offers
    Add in license headers
    Add comments about custom objective option
    Better text in article about Location
    Disable checkout if no consent + consent checkbox
    Some grammar, spelling errors

* Scope down workshop; put back in GOPROXY_OVERRIDE ; base workshop defaults

* Go proxy override

* Expunge "NRF"

Co-authored-by: Shivani Mehendarge <[email protected]>
Co-authored-by: Igor Krtolica <[email protected]>
Co-authored-by: Bastien <[email protected]>
Co-authored-by: James Jory <[email protected]>
Co-authored-by: Kaz Baig <[email protected]>
Co-authored-by: Alex Chirayath <[email protected]>
Co-authored-by: damiendaemon <[email protected]>
Co-authored-by: daemon-joe <[email protected]>
Co-authored-by: Daemon Solutions <[email protected]>
Co-authored-by: Chirayath <[email protected]>
Co-authored-by: Aleksandr Patrushev <[email protected]>
Co-authored-by: Dae.mn <[email protected]>
  • Loading branch information
13 people authored Aug 12, 2021
1 parent 458f72a commit ec3363f
Show file tree
Hide file tree
Showing 105 changed files with 8,904 additions and 10,167 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
.idea
__pycache__/
.vscode
.python-version
build/*
.venv/
venv/
workshop/*/.ipynb_checkpoints
workshop/1-Personalization/interactions.csv
workshop/1-Personalization/items.csv
workshop/1-Personalization/users.csv
workshop/generate_interactions_personalize.py
workshop/generate_interactions_personalize_offers.py
src/web-ui/node_modules
.DS_Store
src/aws-lambda/*/bin/
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ AWS Service | Workshops Overview | Workshop Links | Level | Duration
![Amazon Pinpoint](./workshop/images/Amazon-Pinpoint_64.png) Amazon Pinpoint | In this workshop we will use Amazon Pinpoint to add the ability to dynamically send welcome messages, abandoned cart messages, and messages with personalized product recommendations to the customers of the Retail Demo Store. | [Email Campaigns](./workshop/4-Messaging/4.1-Pinpoint.ipynb) | 200 | 1 hour
![Amazon Lex](./workshop/images/Amazon-Lex_64.png) Amazon Lex | In this module we're going to implement a conversational chatbot using Amazon Lex and integrate it into the Retail Demo Store's web UI. We'll provide some basic functionality to our chatbot such as being able to provide a return policy to users as well as wiring up the chatbot to the Amazon Personalize ML models we created in the Personalization workshop to provide personalized product recommendations to our users. | [Lex Chatbot](./workshop/5-Conversational/5.1-LexChatbot.ipynb) | 200 | 30 minutes
![Amazon Elasticsearch](./workshop/images/Amazon-Elasticsearch-Service_64.png) Amazon Elasticsearch | In this workshop, you will create a new Elasticsearch Index and index the Retail Demo Store product data so that users can search for products.| [Product Search](./workshop/0-StartHere/Search.ipynb) | 200 | 20 minutes
![Amazon Location Services](./workshop/images/Amazon-Location-Services_64.png) Amazon Location Services | Create a geofence for customers approaching your physical store and send them timely pickup notifications and offers. | [Geofencing](./workshop/7-LocationServices/7.1-LocationServices.ipynb) | 300 | 2 hours
Experimentation | In this module we are going to add experimentation to the Retail Demo Store. This will allow us to experiment with different personalization approaches in the user interface. Through notebooks in this module we will demonstrate how to implement three experimentation techniques. | [Overview](./workshop/3-Experimentation/3.1-Overview.ipynb) <br/><br/> [A/B](./workshop/3-Experimentation/3.2-AB-Experiment.ipynb) <br/><br/> [Interleaving](./workshop/3-Experimentation/3.3-Interleaving-Experiment.ipynb) <br/><br/> [Multi-Armed Bandit](./workshop/3-Experimentation/3.4-Multi-Armed-Bandit-Experiment.ipynb) | 400 | 1.5 hours

## Partner Integrations
Expand Down
7 changes: 7 additions & 0 deletions aws/cloudformation-templates/base/_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ Parameters:
Type: String
Description: Google Analytics Measurement Id (optional)

LocationResourcePrefix:
Type: String
Description: Prefix of Location Services resources to use

Resources:

# Authentication
Expand All @@ -75,6 +79,7 @@ Resources:
Parameters:
AuthName: !Sub ${ParentStackName}-${AWS::Region}
PinpointAppId: !GetAtt Pinpoint.Outputs.PinpointAppId
LocationResourcePrefix: !Ref LocationResourcePrefix

# Buckets
Buckets:
Expand All @@ -98,6 +103,8 @@ Resources:
ExperimentStrategyTable: !GetAtt Tables.Outputs.ExperimentStrategyTable
StackBucketName: !GetAtt Buckets.Outputs.StackBucketName
Uid: !Sub ${ParentStackName}-${AWS::Region}
UserPoolId: !GetAtt Authentication.Outputs.UserPoolId
PinpointAppId: !GetAtt Pinpoint.Outputs.PinpointAppId

# Tables
Tables:
Expand Down
39 changes: 39 additions & 0 deletions aws/cloudformation-templates/base/authentication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Parameters:
Type: String
Description: Pinpoint project/application ID

LocationResourcePrefix:
Type: String
Description: Prefix of Location Services resources to use

Resources:
# Creates a role that allows Cognito to send SNS messages
SNSRole:
Expand Down Expand Up @@ -92,6 +96,12 @@ Resources:
StringAttributeConstraints:
MinLength: '1'
MaxLength: '200'
- Name: demo_journey
AttributeDataType: String
Mutable: true
StringAttributeConstraints:
MinLength: '1'
MaxLength: '200'

# Creates a User Pool Client to be used by the identity pool
UserPoolClient:
Expand Down Expand Up @@ -204,6 +214,35 @@ Resources:
- "lex:PostText"
Resource:
- !Sub "arn:aws:lex:${AWS::Region}:${AWS::AccountId}:bot:RetailDemoStore:*"
- Effect: Allow
Action:
- geo:BatchGetDevicePosition
- geo:BatchUpdateDevicePosition
- geo:DescribeTracker
- geo:GetDevicePosition
- geo:GetDevicePositionHistory
- geo:ListDevicePositions
- geo:ListTrackers
Resource:
- !Sub 'arn:aws:geo:${AWS::Region}:${AWS::AccountId}:tracker/${LocationResourcePrefix}*'
- Effect: Allow
Action:
- geo:ListGeofences
- geo:ListGeofenceCollections
- geo:GetGeofence
- geo:DescribeGeofenceCollection
Resource:
- !Sub "arn:aws:geo:${AWS::Region}:${AWS::AccountId}:geofence-collection/${LocationResourcePrefix}*"
- Effect: Allow
Action:
- geo:GetMapGlyphs
- geo:GetMapSprites
- geo:GetMapStyleDescriptor
- geo:GetMapTile
- geo:DescribeMap
- geo:ListMaps
Resource:
- !Sub "arn:aws:geo:${AWS::Region}:${AWS::AccountId}:map/${LocationResourcePrefix}*"

# Assigns the roles to the Identity Pool
IdentityPoolRoleMapping:
Expand Down
113 changes: 111 additions & 2 deletions aws/cloudformation-templates/base/notebook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ Parameters:
Uid:
Type: String

UserPoolId:
Type: String
Description: The Cognito user pool ID.

PinpointAppId:
Type: String

Resources:
NotebookInstance:
Type: AWS::SageMaker::NotebookInstance
Expand All @@ -47,7 +54,13 @@ Resources:
-
Key: "Uid"
Value: !Ref Uid

-
Key: "PinpointAppId"
Value: !Ref PinpointAppId
-
Key: "UserPoolId"
Value: !Ref UserPoolId

SecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
Expand All @@ -72,6 +85,13 @@ Resources:
- "sagemaker.amazonaws.com"
Action:
- "sts:AssumeRole"
-
Effect: "Allow"
Principal:
Service:
- "lambda.amazonaws.com"
Action:
- "sts:AssumeRole"
Path: "/"
Policies:
-
Expand Down Expand Up @@ -206,7 +226,96 @@ Resources:
Action:
- lambda:GetFunction
Resource: !Sub 'arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:RetailDemoStorePinpointRecommender'

-
PolicyName: "7-Location"
PolicyDocument:
Version: "2012-10-17"
Statement:
-
Effect: Allow
Action:
- geo:CreateMap
- geo:DeleteMap
Resource:
- !Sub 'arn:aws:geo:${AWS::Region}:${AWS::AccountId}:map*'
-
Effect: Allow
Action:
- geo:PutGeofence
- geo:CreateGeofenceCollection
- geo:BatchDeleteGeofence
- geo:DeleteGeofenceCollection
- geo:ListGeofences
- geo:ListGeofenceCollections
Resource:
- !Sub 'arn:aws:geo:${AWS::Region}:${AWS::AccountId}:geofence-collection*'
-
Effect: Allow
Action:
- geo:AssociateTrackerConsumer
- geo:DisassociateTrackerConsumer
- geo:CreateTracker
- geo:DeleteTracker
Resource:
- !Sub 'arn:aws:geo:${AWS::Region}:${AWS::AccountId}:tracker*'
-
Effect: Allow
Action:
- geo:BatchUpdateDevicePosition
- geo:BatchGetDevicePosition
- geo:DescribeTracker
- geo:GetDevicePosition
- geo:GetDevicePositionHistory
Resource:
- !Sub 'arn:aws:geo:${AWS::Region}:${AWS::AccountId}:tracker/RetailDemoStoreLocationWorkshop*'
-
Effect: Allow
Action:
- geo:GetGeofence
- geo:DescribeGeofenceCollection
Resource:
- !Sub "arn:aws:geo:${AWS::Region}:${AWS::AccountId}:geofence-collection/RetailDemoStoreLocationWorkshop*"
-
Effect: "Allow"
Action:
- events:PutRule
- events:DeleteRule
- events:PutTargets
- events:RemoveTargets
Resource:
- !Sub 'arn:aws:events:${AWS::Region}:${AWS::AccountId}:rule/*'
-
Effect: Allow
Action:
- cognito-idp:AdminGetUser
Resource: !Sub "arn:aws:cognito-idp:${AWS::Region}:${AWS::AccountId}:userpool/${UserPoolId}"
-
Effect: "Allow"
Action:
- lambda:AddPermission
- lambda:CreateFunction
- lambda:DeleteFunction
Resource:
- !Sub 'arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:LocationNotebookEventHandler'
-
Effect: "Allow"
Action:
- iam:PassRole
Resource:
- !Sub 'arn:aws:iam::${AWS::AccountId}:role/*'
- Effect: Allow
Action:
- logs:CreateLogStream
- logs:PutLogEvents
Resource:
- !Sub 'arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/LocationNotebookEventHandler:log-stream:*'
- !Sub 'arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/LocationNotebookEventHandler'
-
Effect: Allow
Action:
- logs:CreateLogGroup
Resource: '*'

Outputs:
NotebookInstanceId:
Value: !Ref NotebookInstance
Expand Down
21 changes: 21 additions & 0 deletions aws/cloudformation-templates/base/ssm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,30 @@ Resources:
Value: "NONE"
Description: "Retail Demo Store Personalized Ranking Campaign Arn Parameter"

ParameterPersonalizedOffersCampaignArn:
Type: "AWS::SSM::Parameter"
Properties:
Name: "retaildemostore-personalized-offers-campaign-arn"
Type: "String"
Value: "NONE"
Description: "Retail Demo Store Personalized Coupon Offers Campaign Arn Parameter"

ParameterPersonalizeTrainConfig:
Type: "AWS::SSM::Parameter"
Properties:
Name: "retaildemostore-training-config"
Type: "String"
Value: "NONE"
Description: "Retail Demo Store Personalize Train Config"
Tier: "Advanced"

ParameterPersonalizeTrainState:
Type: "AWS::SSM::Parameter"
Properties:
Name: "retaildemostore-training-state"
Type: "String"
Value: "NONE"
Description: "Retail Demo Store Personalize Train State"

ParameterPersonalizeFilterPurchasedArn:
Type: "AWS::SSM::Parameter"
Expand Down Expand Up @@ -181,6 +198,10 @@ Outputs:
Description: Train config
Value: !Ref ParameterPersonalizeTrainConfig

ParameterPersonalizeTrainState:
Description: Train state
Value: !Ref ParameterPersonalizeTrainState

ParameterPersonalizeFilterPurchasedArn:
Description: Personalize Filter Purchased Products Arn
Value: !Ref ParameterPersonalizeFilterPurchasedArn
Expand Down
12 changes: 11 additions & 1 deletion aws/cloudformation-templates/deployment-support.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,17 @@ Parameters:
CustomizeRecommendationsFunctionArn:
Type: String

CustomizeOffersRecommendationsFunctionArn:
Type: String

UseDefaultIVSStreams:
Type: String
Default: Yes

DeployPersonalizedOffersCampaign:
Type: String
Default: No

Conditions:
DeployPreIndexElasticsearch: !Equals
- !Ref PreIndexElasticsearch
Expand Down Expand Up @@ -134,6 +141,7 @@ Resources:
csv_path: !Sub '${ResourceBucketRelativePath}csvs/'
lambda_event_rule_name: 'RetailDemoStore-PersonalizePreCreateScheduledRule'
Uid: !Ref Uid
DeployPersonalizedOffersCampaign: !Ref DeployPersonalizedOffersCampaign

PersonalizePreCreateLambdaExecutionRole:
Condition: DeployPreCreateCampaign
Expand Down Expand Up @@ -232,7 +240,7 @@ Resources:
- personalize:DeleteSolution
- personalize:ListFilters
Resource:
- !Sub 'arn:aws:personalize:${AWS::Region}:${AWS::AccountId}:*/retaildemostore*'
- !Sub 'arn:aws:personalize:${AWS::Region}:${AWS::AccountId}:*/retaildemo*'
- Effect: Allow
Action:
- personalize:DescribeEventTracker
Expand Down Expand Up @@ -473,10 +481,12 @@ Resources:
Variables:
pinpoint_app_id: !Ref PinpointAppId
pinpoint_recommender_arn: !Ref CustomizeRecommendationsFunctionArn
pinpoint_offers_recommender_arn: !Ref CustomizeOffersRecommendationsFunctionArn
pinpoint_personalize_role_arn: !Ref PinpointPersonalizeRoleArn
email_from_address: !Ref PinpointEmailFromAddress
email_from_name: !Ref PinpointEmailFromName
lambda_event_rule_name: 'RetailDemoStore-PinpointPreCreateRule'
DeployPersonalizedOffersCampaign: !Ref DeployPersonalizedOffersCampaign

PinpointPreCreateLambdaExecutionRole:
Condition: DeployPreCreatePinpointWorkshop
Expand Down
2 changes: 2 additions & 0 deletions aws/cloudformation-templates/event-engine/base-workshop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ Resources:
PinpointEmailFromAddress: '[email protected]' # Only change if you change PreCreatePinpointWorkshop to 'Yes'
PinpointEmailFromName: 'AWS Retail Demo Store'
UseDefaultIVSStreams: 'Yes' # Leave to 'Yes' until EE supports reaping IVS resources
DeployLocationServices: 'No' # Switch to 'Yes' to deploy location services resources used by demo. Orthogonal to Location Services workshop.
DeployPersonalizedOffersCampaign: 'No' # Switch to 'Yes' to get personalised offers triggered by geofence events in the demo. Orthogonal to personalised offers workshop.
PinpointSMSLongCode: 'NONE'
AmplitudeApiKey: 'NONE'
OptimizelySdkKey: 'NONE'
Expand Down
Loading

0 comments on commit ec3363f

Please sign in to comment.