Skip to content

FrameworkProcessor does not use output_kms_key when uploading the code artifact #3389

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
szamarin opened this issue Oct 3, 2022 · 2 comments

Comments

@szamarin
Copy link

szamarin commented Oct 3, 2022

The Framework processor creates an Estimator when uploading the code artifact (sourcedir.tar.gz) to S3. However when instantiating the estimator, the output_kms_key is not passed to the constructor (code)

    def _upload_payload(
        self,
        entry_point: str,
        source_dir: Optional[str],
        dependencies: Optional[List[str]],
        git_config: Optional[Dict[str, str]],
        job_name: str,
    ) -> "sagemaker.estimator.Framework":  # type: ignore[name-defined]   # noqa: F821
        """Upload payload sourcedir.tar.gz to S3."""
        # A new estimator instance is required, because each call to ScriptProcessor.run() can
        # use different codes.
        estimator = self._create_estimator(
            entry_point=entry_point,
            source_dir=source_dir,
            dependencies=dependencies,
            git_config=git_config,
        )

        estimator._prepare_for_training(job_name=job_name)
        logger.info(
            "Uploaded %s to %s",
            estimator.source_dir,
            estimator._hyperparameters["sagemaker_submit_directory"],
        )

        return estimator

If a customer has a bucket policy that requires a SSE with KMS, they are unable to use the Frameworkprocessor.

@knikure
Copy link
Contributor

knikure commented Apr 27, 2023

Closing this issue as #3784 fixed it.

@knikure knikure closed this as completed Apr 27, 2023
@szamarin
Copy link
Author

Don't see how is this related to #3784 as that is for the Model not FrameworkProcessor. This issue is still not fixed and should be reopened. The fix is here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants