Skip to content

IngestionManagerPandas doesn't propagate Boto3 Session profile_name to Workers #2298

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

Closed
apriceaws opened this issue Apr 22, 2021 · 6 comments
Labels
component: feature store Relates to the SageMaker Feature Store Platform type: bug

Comments

@apriceaws
Copy link

Describe the bug
When ingesting a DataFrame to a FeatureGroup, there is no way to set the profile_name in the Boto3 Session used by IngestionManagerPandas workers/threads. This prevents utilizing anything but default credentials when ingesting to a FeatureGroup using this class.

To reproduce

  1. Ensure "default" creds profile does not have access to write to FeatureGroup
  2. Ensure "<profile_name>" creds profile does have access to write to FeatureGroup
  3. Set a profile_name on boto3 using boto3.setup_default_session(profile_name=<profile_name>)
  4. Attempt to ingest a dataframe to a FeatureGroup using .ingest()
  5. Ingest will fail because "default" creds do not have access, and "<profile_name>" creds will not be used in the workers

Expected behavior
Worker Boto3 sessions should be initialized with a profile name which matches boto3.DEFAULT_SESSION.profile_name.

System information
A description of your system. Please provide:

  • SageMaker 2.38.0

Additional context
Use of default credentials is not an option in this context.

@apriceaws
Copy link
Author

I believe this is related to #2288.

@apriceaws
Copy link
Author

Confirmed that this worked fine in SageMaker 2.37

@ahsan-z-khan
Copy link
Member

@alex-tang , can you take a look at this?

@ahsan-z-khan ahsan-z-khan added the component: feature store Relates to the SageMaker Feature Store Platform label Jul 30, 2021
@gustavovaliati
Copy link

Any news on that? We still have got the same issue at v2.51.

@kusumbhatt
Copy link
Contributor

@apriceaws Apologies for getting back to this so late.

Earlier the profile name was not trickled down to the worker sessions in the ingest(..) method and hence the workers were making use of default credentials.

This now supports providing "profile_name" as an argument in ingest(..) method and the worker sessions are initialized with the profile parameter. So, in order to use the profile_name different than default, it should be passed to profile_name argument in the ingest(..) method. In case, the profile_name argument is not specified, the ingest(..) method uses the default credentials.

Can you please confirm if this helps you?

@zhaoqizqwang
Copy link
Contributor

Closing this ticket since the profile_name is supported as an argument in newer sagemaker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: feature store Relates to the SageMaker Feature Store Platform type: bug
Projects
None yet
Development

No branches or pull requests

5 participants