-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Personalize domain recommenders (#327)
* Personalize domain recommenders * Always deploy personalize pre-create * Fix template typo from upstream PR * Fix resource typo * Create/delete Personalize resources * CFN cleanup
- Loading branch information
1 parent
4be83e0
commit 43eedd9
Showing
86 changed files
with
7,615 additions
and
5,789 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
AWSTemplateFormatVersion: 2010-09-09 | ||
|
||
Description: > | ||
This template creates and prepares Amazon Personalize support resources | ||
Parameters: | ||
ResourceBucket: | ||
Type: String | ||
Description: S3Bucket Bucket where the Resources are stored (cloudformation, images, lambda code) | ||
|
||
Uid: | ||
Type: String | ||
|
||
StackBucketName: | ||
Type: String | ||
Description: S3 bucket name for the stack bucket used to stage Personalize input and output files | ||
|
||
Resources: | ||
StackBucketPolicy: | ||
Type: AWS::S3::BucketPolicy | ||
Properties: | ||
Bucket: !Ref StackBucketName | ||
PolicyDocument: | ||
Version: 2012-10-17 | ||
Statement: | ||
- Effect: Allow | ||
Action: | ||
- s3:GetObject | ||
- s3:PutObject | ||
- s3:ListBucket | ||
Resource: | ||
- !Sub "arn:aws:s3:::${StackBucketName}" | ||
- !Sub "arn:aws:s3:::${StackBucketName}/*" | ||
Principal: | ||
Service: personalize.amazonaws.com | ||
|
||
PersonalizeServiceRole: | ||
Type: AWS::IAM::Role | ||
Properties: | ||
RoleName: !Sub "${Uid}-PersonalizeS3" | ||
AssumeRolePolicyDocument: | ||
Version: 2012-10-17 | ||
Statement: | ||
- Effect: Allow | ||
Principal: | ||
Service: personalize.amazonaws.com | ||
Action: | ||
- sts:AssumeRole | ||
Policies: | ||
- PolicyName: BucketAccess | ||
PolicyDocument: | ||
Version: 2012-10-17 | ||
Statement: | ||
- Effect: Allow | ||
Action: | ||
- s3:GetObject | ||
- s3:ListBucket | ||
Resource: | ||
- !Sub "arn:aws:s3:::${ResourceBucket}" # So imports can be run directly from resource bucket | ||
- !Sub "arn:aws:s3:::${ResourceBucket}/*" # So imports can be run directly from resource bucket | ||
- !Sub "arn:aws:s3:::${StackBucketName}" | ||
- !Sub "arn:aws:s3:::${StackBucketName}/*" | ||
- Effect: Allow | ||
Action: | ||
- s3:PutObject | ||
Resource: | ||
- !Sub "arn:aws:s3:::${StackBucketName}" | ||
- !Sub "arn:aws:s3:::${StackBucketName}/*" | ||
|
||
Outputs: | ||
PersonalizeServiceRole: | ||
Description: Personalize service role ARN | ||
Value: !GetAtt PersonalizeServiceRole.Arn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.