Follow the workshop material:
-
Create a Cloud9 Environment
-
Perform these steps in lab1:
cd ~/environment
sudo yum install jq -y
git clone https://github.com/aws-samples/amazon-sagemaker-studio-secure-data-science-workshop.git
cd ~/environment/amazon-sagemaker-studio-secure-data-science-workshop
if [[ "${C9_PROJECT}" ]]; then
echo "In AWS Cloud9 environment"
export AWS_ACCOUNT_ID=`curl -s http://169.254.169.254/latest/dynamic/instance-identity/document|jq -r .accountId`
export AWS_DEFAULT_REGION=`curl -s http://169.254.169.254/latest/dynamic/instance-identity/document|jq -r .region`
fi
./package_cloudformation.sh
Do not run any other steps in Lab 1 Do not do anything in Lab 2
Instead we will use Terraform to:
- Provision and populate the ECR repo.
- Create the VPC, subnets, VPC Endpoints, IAM Roles and Policies.
- Create the SageMaker domain needed by the lab.
- Create the Code Artifact repos - populated with the required packages.
- Create the Service Catalog products for provisioning the secure team environment and SageMaker user profiles.
Copy the modified Cloud Formation Templates into place (used in step 04)
cd ~/environment/secure-ds-workshop-terraform/00-cloudformation
./copy-cf-tos3.sh
cd ~/environment/secure-ds-workshop-terraform/01-populate-ecr
terraform init
terraform validate && terraform plan -out tfplan
terraform apply tfplan
Build the VPC, Artifact rpo and SageMaker Domain
cd ~/environment/secure-ds-workshop-terraform/02-infra-domain
terraform init
terraform validate && terraform plan -out tfplan
terraform apply tfplan
cd ~/environment/secure-ds-workshop-terraform/03-populate-artifacts
terraform init
terraform validate && terraform plan -out tfplan
terraform apply tfplan
cd ~/environment/secure-ds-workshop-terraform/04-service-catalog
terraform init
terraform validate && terraform plan -out tfplan
terraform apply tfplan
### Lab 3: Secure Team Environment
The Terraform content was created using: https://github.com/aws-samples/aws2tf