exasol / sagemaker-extension

An Exasol extension to interact with AWS SageMaker from inside the database
MIT License
3 stars 1 forks source link

Add Python3 UDF to orchestrate the SageMaker Autopilot training from Exasol #2

Closed tkilias closed 2 years ago

tkilias commented 3 years ago

Background

Tips

Acceptance Criteria

tkilias commented 3 years ago

If you want to use the EC2 Instance credentials in UDFs you need to add the following to the UDF

    f = open("/tmp/.config", "w")
    f.write(
        "[default]\\nregion = {region!r}\\nrole_arn = {role!r}\\ncredential_source = Ec2InstanceMetadata")
    f.close()
    os.environ['AWS_CONFIG_FILE'] = '/tmp/.config'

see https://github.com/exasol/data-science-examples/blob/e85ce663a0474c60bd8d8700c9ae60c05c38f1e3/tutorials/machine-learning/python/sagemaker/UseSagemakerModelFromExasol.ipynb

tkilias commented 3 years ago

Overview diagram

sagemaker-extension-overview png

tkilias commented 3 years ago

Drawio file sagemaker-extension-overview.drawio