AWSTemplateFormatVersion: '2010-09-09' Description: 'Fetches the presigned notebook URL for SageMaker, including the role for SageMaker Notebook.' Parameters: UserName: Type: String Description: The AIM Username to get a new URL. Default: 'replace-name' AllowedPattern: '[a-z0-9-]{1,63}' Resources: PresignURL: Type: Custom::CreateURL Properties: ServiceToken: !ImportValue 'Lambda-SageMakerStudioURL' PROFILE: !Ref 'UserName' ENDPOINT: !ImportValue 'Network-APIDNS' RoleArn: !Sub 'arn:aws:iam::${AWS::AccountId}:role/Notbook-URL-instanciator-SageMaker-Lambda-Role' Version: 1 Outputs: PresignedURL: Description: SageMaker Notebook URL Value: !GetAtt - PresignURL - AuthorizedUrl