AWSTemplateFormatVersion: 2010-09-09 Description: 'Amazon Fraud Detector template' Resources: TrainingBucket: Type: AWS::S3::Bucket Properties: PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 OutputBucket: Type: AWS::S3::Bucket Properties: PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 BasicNotebookInstance: Type: AWS::SageMaker::NotebookInstance Properties: InstanceType: ml.m5.12xlarge NotebookInstanceName: FraudDetectorNotebook RoleArn: Fn::GetAtt: - NotebookInstanceExecutionRole - Arn LifecycleConfigName: Fn::GetAtt: - BasicNotebookInstanceLifecycleConfig - NotebookInstanceLifecycleConfigName DependsOn: - NotebookInstanceExecutionRole Metadata: cfn_nag: rules_to_suppress: - id: W1201 reason: Solution does not have KMS encryption enabled by default BasicNotebookInstanceLifecycleConfig: Type: AWS::SageMaker::NotebookInstanceLifecycleConfig Properties: OnCreate: - Content: Fn::Base64: Fn::Sub: 'set -e # perform following actions as ec2-user sudo -u ec2-user -i <> .env echo "AWS_ACCOUNT_ID=${AWS::AccountId}" >> .env echo "AWS_REGION=${AWS::Region}" >> .env echo "SAGEMAKER_IAM_ROLE=${NotebookInstanceExecutionRole.Arn}" >> .env EOF ' OnStart: - Content: Fn::Base64: Fn::Sub: 'set -e # perform following actions as ec2-user sudo -u ec2-user -i <