Skip to content

Instantly share code, notes, and snippets.

@hariby
Last active January 4, 2022 06:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hariby/e6e40fa38cc737e252c94f8c381dde83 to your computer and use it in GitHub Desktop.
Save hariby/e6e40fa38cc737e252c94f8c381dde83 to your computer and use it in GitHub Desktop.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "IamPassRole",
"Effect": "Allow",
"Action": "iam:PassRole",
"Resource": "arn:aws:iam::*:role/AmazonBraketServiceSageMakerNotebookRole-*"
},
{
"Sid": "SageMakerActions",
"Effect": "Allow",
"Action": [
"sagemaker:DeleteNotebookInstance",
"sagemaker:StopNotebookInstance",
"sagemaker:CreatePresignedNotebookInstanceUrl",
"sagemaker:CreateNotebookInstanceLifecycleConfig",
"sagemaker:ListNotebookInstances",
"sagemaker:CreateNotebookInstance"
],
"Resource": "*"
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::amazon-braket-*",
"arn:aws:s3:::braketnotebookcdk-*"
]
},
{
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"logs:DescribeLogStreams",
"logs:PutLogEvents",
"logs:CreateLogGroup"
],
"Resource": [
"arn:aws:logs:*::log-group:/aws/sagemaker/*"
]
},
{
"Effect": "Allow",
"Action": "braket:*",
"Resource": "*"
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "sagemaker.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ExplicitAllowReadOnlyActionsOnAllTasks",
"Effect": "Allow",
"Action": [
"braket:GetQuantumTask",
"braket:ListTagsForResource"
],
"Resource": "arn:aws:braket:*:*:quantum-task/*"
},
{
"Sid": "ExplicitAllowReadOnlyActionsOnAllResources",
"Effect": "Allow",
"Action": [
"braket:GetDevice",
"braket:SearchDevices",
"braket:SearchQuantumTasks"
],
"Resource": "*"
},
{
"Sid": "ExplicitDenyCreateQuantumTask",
"Effect": "Deny",
"Action": "braket:CreateQuantumTask",
"Resource": "arn:aws:braket:*:*:device/qpu/*"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment