Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9e370be
added unique postfix to detective control role name to prevent collision
jpbarto Oct 5, 2020
f8a1fe3
removed explicit name from detective control to prevent collision and…
jpbarto Oct 5, 2020
2fdf2ee
added macros to enforce lower case, no spaces, and a max length for p…
jpbarto Oct 5, 2020
7f0251f
added macros to enforce lower case, no spaces, and a max length for p…
jpbarto Oct 5, 2020
6f2915a
updated cloudformation for environment to include a natural project n…
jpbarto Oct 5, 2020
e20d7ef
added the string macro to the deployment for smarter cloudformation
jpbarto Oct 8, 2020
4aaa5f1
fixed invalid cli in the readme
jpbarto Oct 8, 2020
66b592f
added the string macro deployment to the administration template
jpbarto Oct 8, 2020
8bb9950
fixed invalid invoke of string macro
jpbarto Oct 8, 2020
2057445
added validation of cloudformation template prior to packaging
jpbarto Oct 8, 2020
20f2844
test of pyplate macro to ensure project names are suitable for S3 buc…
jpbarto Oct 17, 2020
1e73f97
updated environment to try to use the pyplate macro
jpbarto Oct 17, 2020
d934d57
added missing permissions to launch role
jpbarto Oct 17, 2020
daa1603
replaced project name with sanitized version
jpbarto Oct 17, 2020
d19ceaf
dropped natural project name from provider field of portfolio due to …
jpbarto Oct 17, 2020
690180b
renamed stack to reflect pyplate adoption
jpbarto Oct 17, 2020
ebecbfb
added invokefunction permission
jpbarto Oct 18, 2020
a0d7a64
changed reduction of project name from 32 chars to 26 chars to keep w…
jpbarto Oct 19, 2020
8d4b0f8
changed natural project name for coded project name
jpbarto Oct 19, 2020
d5fbc2e
Replaced deprecated Lambda policy
abijango Sep 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cloudformation/ds_admin_detective.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Resources:
Principal:
Service: lambda.amazonaws.com
Action: 'sts:AssumeRole'
RoleName: !Sub '${StackSetName}-SageMaker-DetectiveControl-Role'
Policies:
- PolicyName: LambdaInlineForSageMaker
PolicyDocument:
Expand Down
2 changes: 2 additions & 0 deletions cloudformation/ds_admin_principals.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Resources:
Effect: Allow
Action:
- 'cloudformation:CreateStack'
- 'cloudformation:CreateChangeSet'
- 'cloudformation:DeleteStack'
- 'cloudformation:DescribeStacks'
- 'cloudformation:DescribeStackEvents'
Expand Down Expand Up @@ -130,6 +131,7 @@ Resources:
- 'kms:UpdateAlias'
- 'kms:UpdateCustomKeyStore'
- 'kms:UpdateKeyDescription'
- 'lambda:InvokeFunction'
- 'resource-groups:CreateGroup'
- 'resource-groups:DeleteGroup'
- 'resource-groups:Tag'
Expand Down
5 changes: 5 additions & 0 deletions cloudformation/ds_administration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ Resources:
ProductId: !Ref DSEnvironmentProduct
RoleArn: !GetAtt DataSciencePrincipals.Outputs.SCLaunchRoleArn

CfnPyPlateMacro:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: pyplate_macro.yaml

DataSciencePrincipals:
Type: AWS::CloudFormation::Stack
Properties:
Expand Down
18 changes: 11 additions & 7 deletions cloudformation/ds_env_backing_store.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
Description: Data Science Environment S3 data storage

Parameters:
NaturalProjectName:
Type: String
Description: Natural name of the project team.

ProjectName:
Type: String
AllowedPattern: '[A-Za-z0-9\-]*'
Description: Please specify your project name. Used as a suffix for project resource names.
AllowedPattern: '[a-z0-9\-]*'
Description: Project team name with no spaces or uppercase letters.

EnvType:
Description: System Environment
Expand Down Expand Up @@ -93,7 +97,7 @@ Resources:
!Sub "ds-s3-endpoint-${ProjectName}-${EnvType}-id"
Tags:
- Key: ProjectName
Value: !Ref ProjectName
Value: !Ref NaturalProjectName
- Key: EnvironmentType
Value: !Ref EnvType

Expand All @@ -116,7 +120,7 @@ Resources:
DataBucket:
Type: 'AWS::S3::Bucket'
Properties:
BucketName:
BucketName:
!Join
- ''
-
Expand Down Expand Up @@ -146,7 +150,7 @@ Resources:
KMSMasterKeyID: !Ref KMSCMK
Tags:
- Key: ProjectName
Value: !Ref ProjectName
Value: !Ref NaturalProjectName
- Key: EnvironmentType
Value: !Ref EnvType

Expand Down Expand Up @@ -204,7 +208,7 @@ Resources:
KMSMasterKeyID: !Ref KMSCMK
Tags:
- Key: ProjectName
Value: !Ref ProjectName
Value: !Ref NaturalProjectName
- Key: EnvironmentType
Value: !Ref EnvType

Expand Down Expand Up @@ -240,6 +244,6 @@ Resources:
Key: '< S3_CFN_STAGING_PATH >/project_template.zip'
Tags:
- Key: ProjectName
Value: !Ref ProjectName
Value: !Ref NaturalProjectName
- Key: EnvironmentType
Value: !Ref EnvType
18 changes: 11 additions & 7 deletions cloudformation/ds_env_catalog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ Description: |
Template to create a service catalog product to launch a notebook

Parameters:
NaturalProjectName:
Type: String
Description: Natural name of the project team.

ProjectName:
Type: String
AllowedPattern: '[A-Za-z0-9\-]*'
Description: Please specify your project name. Used as a suffix for project resource names.
AllowedPattern: '[a-z0-9\-]*'
Description: Project team name with no spaces or uppercase letters.

EnvType:
Description: System Environment
Expand All @@ -29,15 +33,15 @@ Resources:
ProviderName: !Sub '${ProjectName} Administration'
Tags:
- Key: ProjectName
Value: !Ref ProjectName
Value: !Ref NaturalProjectName
- Key: EnvironmentType
Value: !Ref EnvType

DSUserNotebookProduct:
Type: AWS::ServiceCatalog::CloudFormationProduct
Properties:
Description: !Sub 'SageMaker ${EnvType} notebook for the ${ProjectName} project'
Name: !Sub '${ProjectName} SageMaker ${EnvType} notebook'
Description: !Sub 'SageMaker ${EnvType} notebook for the ${NaturalProjectName} project'
Name: !Sub '${NaturalProjectName} SageMaker ${EnvType} notebook'
Owner: 'Data Science CoE'
ProvisioningArtifactParameters:
- Name: 'DS User Notebook v1'
Expand Down Expand Up @@ -152,10 +156,10 @@ Resources:
- 'arn:aws:iam::aws:policy/AWSCloudFormationFullAccess'
- 'arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess'
- 'arn:aws:iam::aws:policy/AmazonSageMakerFullAccess'
- 'arn:aws:iam::aws:policy/AWSLambdaFullAccess'
- 'arn:aws:iam::aws:policy/AWSLambda_FullAccess'
Tags:
- Key: ProjectName
Value: !Ref ProjectName
Value: !Ref NaturalProjectName
- Key: EnvironmentType
Value: !Ref EnvType

Expand Down
24 changes: 14 additions & 10 deletions cloudformation/ds_env_network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ Description: |
Create a secure VPC designed to host a data science project team.

Parameters:
NaturalProjectName:
Type: String
Description: Natural name of the project team.

ProjectName:
Type: String
AllowedPattern: '[A-Za-z0-9\-]*'
Description: Please specify your project name. Used as a suffix for project resource names.
AllowedPattern: '[a-z0-9\-]*'
Description: Project team name with no spaces or uppercase letters.

EnvType:
Description: System Environment
Expand Down Expand Up @@ -93,7 +97,7 @@ Resources:
- Key: Name
Value: !Sub "ds-vpc-${ProjectName}-${EnvType}"
- Key: ProjectName
Value: !Ref ProjectName
Value: !Ref NaturalProjectName
- Key: EnvironmentType
Value: !Ref EnvType

Expand All @@ -113,7 +117,7 @@ Resources:
AvailabilityZone: !Sub "${AWS::Region}a"
Tags:
- Key: ProjectName
Value: !Ref ProjectName
Value: !Ref NaturalProjectName
- Key: EnvironmentType
Value: !Ref EnvType

Expand All @@ -133,7 +137,7 @@ Resources:
AvailabilityZone: !Sub "${AWS::Region}b"
Tags:
- Key: ProjectName
Value: !Ref ProjectName
Value: !Ref NaturalProjectName
- Key: EnvironmentType
Value: !Ref EnvType

Expand All @@ -153,7 +157,7 @@ Resources:
AvailabilityZone: !Sub "${AWS::Region}c"
Tags:
- Key: ProjectName
Value: !Ref ProjectName
Value: !Ref NaturalProjectName
- Key: EnvironmentType
Value: !Ref EnvType

Expand All @@ -177,7 +181,7 @@ Resources:
VpcId: !Ref SageMakerVPC
Tags:
- Key: ProjectName
Value: !Ref ProjectName
Value: !Ref NaturalProjectName
- Key: EnvironmentType
Value: !Ref EnvType

Expand Down Expand Up @@ -217,7 +221,7 @@ Resources:
SourceSecurityGroupId: !GetAtt SageMakerSecurityGroup.GroupId
Tags:
- Key: ProjectName
Value: !Ref ProjectName
Value: !Ref NaturalProjectName
- Key: EnvironmentType
Value: !Ref EnvType

Expand All @@ -228,7 +232,7 @@ Resources:
VpcId: !Ref SageMakerVPC
Tags:
- Key: ProjectName
Value: !Ref ProjectName
Value: !Ref NaturalProjectName
- Key: EnvironmentType
Value: !Ref EnvType

Expand All @@ -252,7 +256,7 @@ Resources:
SourceSecurityGroupId: !GetAtt SageMakerSecurityGroup.GroupId
Tags:
- Key: ProjectName
Value: !Ref ProjectName
Value: !Ref NaturalProjectName
- Key: EnvironmentType
Value: !Ref EnvType

Expand Down
12 changes: 8 additions & 4 deletions cloudformation/ds_env_principals.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ Description: |
Template to create IAM principals for operation within the data science environment.

Parameters:
NaturalProjectName:
Type: String
Description: Natural name of the project team.

ProjectName:
Type: String
AllowedPattern: '[A-Za-z0-9\-]*'
Description: Please specify your project name. Used as a suffix for project resource names.
AllowedPattern: '[a-z0-9\-]*'
Description: Project team name with no spaces or uppercase letters.

EnvType:
Description: System Environment
Expand Down Expand Up @@ -67,7 +71,7 @@ Resources:
- 'arn:aws:iam::aws:policy/AWSCodeCommitFullAccess'
Tags:
- Key: ProjectName
Value: !Ref ProjectName
Value: !Ref NaturalProjectName
- Key: EnvironmentType
Value: !Ref EnvType

Expand Down Expand Up @@ -176,7 +180,7 @@ Resources:
- 'arn:aws:iam::aws:policy/AWSCodeCommitReadOnly'
Tags:
- Key: ProjectName
Value: !Ref ProjectName
Value: !Ref NaturalProjectName
- Key: EnvironmentType
Value: !Ref EnvType

Expand Down
8 changes: 6 additions & 2 deletions cloudformation/ds_env_sagemaker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
Description: SageMaker specific resources for Data Science Environment

Parameters:
NaturalProjectName:
Type: String
Description: Natural name of the project team.

ProjectName:
Type: String
AllowedPattern: '[A-Za-z0-9\-]*'
Description: Please specify your Team Name. Used as a suffix for team resource names
AllowedPattern: '[a-z0-9\-]*'
Description: Project team name with no spaces or uppercase letters.

EnvType:
Description: >-
Expand Down
Loading