Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom SSL certificate bundles #5108

Open
ntw-au opened this issue Mar 27, 2025 · 2 comments
Open

Support custom SSL certificate bundles #5108

ntw-au opened this issue Mar 27, 2025 · 2 comments
Labels
type: config missing Use when there is a request for update in config type: feature request

Comments

@ntw-au
Copy link

ntw-au commented Mar 27, 2025

Describe the feature you'd like
Support custom SSL verification control in SageMaker Python SDK.

Boto3 supports the verify parameter when creating a client, which allows either disabling SSL verification or setting a custom certificate bundle. Alternatively, a custom certificate bundle can be set through the config file or by the AWS_CA_BUNDLE environment variable.

However, these are not exposed or respected by the SageMaker Python SDK. This prevents SageMaker code from being used behind some corporate firewalls.

The lack of this feature has been noted in #3656

How would this feature be used? Please describe.
Corporate firewalls may re-encrypt an SSL connection with their own certificate. Unless this certificate is configured as a root certificate, SSL verification fails. This change will allow use of the SageMaker Python SDK behind such MITM-based firewalls.

Describe alternatives you've considered
N/A

Additional context
The specific error raised by SageMaker:

SSLError: SSL validation failed for https://sts.us-west-2.amazonaws.com/ [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1147)
@benieric benieric added type: feature request type: config missing Use when there is a request for update in config labels Mar 27, 2025
@benieric
Copy link
Contributor

Hi @ntw-au, thanks for posting this, i agree PySDK should have some better way to allow user to set such configurations for clients, but was wondering if you had tried using the ~/.aws/config for such configs if Env Var is not working?

https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html#using-a-configuration-file

@ntw-au
Copy link
Author

ntw-au commented Mar 30, 2025

Thanks @benieric, I have tried the config file but haven't had any success. I've tried different variants of escaping, slash direction (noting that I'm on Windows) and quoting, but it never seems to use the setting.

[default]
ca_bundle = C:\Path\To\Certificate\Bundle.pem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: config missing Use when there is a request for update in config type: feature request
Projects
None yet
Development

No branches or pull requests

2 participants