Sync Docs
Sync HomeLaunch GradientBook Demo
  • Sync Gradient
    • The Gradient Platform
      • How Does it Work?
    • Discover Quickstart
    • Add Workspace
      • Create Sync API Key
      • Add Databricks Workspace
        • AWS Databricks Setup
          • EventBridge Setup
        • Azure Databricks Setup
      • Webhook Setup
    • Project Setup
      • Import Jobs to Projects
      • Verify and Run Jobs
      • Generate and Apply Recommendation
    • Advanced Use Cases
      • Install the Sync-CLI
      • Manual Workspace Setup
        • AWS Instance Profile
      • Apache Airflow for Databricks
      • Gradient Terraform Integration
    • Project Settings
    • Account Settings
    • ROI Reporting
    • FAQ
  • Tutorials & Best Practices
    • Running Gradient in Production
      • Production Auto-Enabled
      • Optimization Windows
      • Development Clones
    • Demos
  • Developer Docs
    • Resources
    • Sync Python Library
    • Gradient CLI Walkthrough
  • Security
    • Privacy and Security Compliance
  • Trust Center
    • Portal
  • Product Announcements
    • Product Updates
  • Need Help?
    • Troubleshooting Guide
Powered by GitBook
On this page
  • Common Issues
  • Environment Variables not set
  • Insufficient Permissions to Make AWS Calls

Was this helpful?

Export as PDF
  1. Need Help?

Troubleshooting Guide

Common Issues

This section provides some troubleshooting tips related to Gradient

Environment Variables not set

AttributeError: 'NoneType' object has no attribute 'host'
or 
AttributeError: 'NoneType' object has no attribute 'result'

This error is returned when Gradient can not access one to the environment variables that are required to return a recommendation. If you are using the CLI, make sure you have run

sync-cli configure

and that you have provided all the required values. If you are using the programatic Python interface, make sure the environment you working in has the following environment variable set:

DATABRICKS_TOKEN={{secrets/demo_workflow/db_token}}
SYNC_API_KEY_SECRET={{secrets/demo_workflow/sync_secret_access_key}}
AWS_DEFAULT_REGION=us-east-1
AWS_SECRET_ACCESS_KEY={{secrets/demo_workflow/aws_secret_access_key}}
AWS_ACCESS_KEY_ID={{secrets/demo_workflow/aws_access_key_id}}
SYNC_API_KEY_ID={{secrets/demo_workflow/sync_access_key_id}}
DATABRICKS_HOST=https://workspace.cloud.databricks.com/

Insufficient Permissions to Make AWS Calls

If you receive an AWS permissions error, please review your AWS policy to ensure the following permissions are granted to the role executing the Gradient prediction.

% aws iam get-role-policy --role-name sync-minimum-access --policy-name sync-minimum-access                                                           
{                                                                                                                                                                                                                
    "RoleName": "sync-minimum-access",
    "PolicyName": "sync-minimum-access",
    "PolicyDocument": {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Sid": "VisualEditor0",
                "Effect": "Allow",
                "Action": "ec2:DescribeInstances",
                "Resource": "*"
            },
            {
                "Sid": "VisualEditor1",
                "Effect": "Allow",
                "Action": [
                    "s3:PutObject",
                    "s3:GetObject",
                    "s3:ListBucket"
                ],
                "Resource": [
                    "arn:aws:s3:::sync-us-east-1-temp-90-days/sync/*",
                    "arn:aws:s3:::sync-us-east-1-temp-90-days"
                ]
            }
        ]
    }
}
PreviousProduct Updates

Last updated 1 year ago

Was this helpful?