awslabs / predictive-maintenance-using-machine-learning

Set up end-to-end demo architecture for predictive maintenance issues with Machine Learning using Amazon SageMaker
Apache License 2.0
102 stars 59 forks source link

Can't create transform job in Lambda function #3

Closed mstfldmr closed 4 years ago

mstfldmr commented 5 years ago

Lambda execution creates this Cloudwatch log:

[ERROR] ClientError: An error occurred (ValidationException) when calling the CreateTransformJob operation: Could not assume role arn:aws:iam::XXX:role/PredictiveMaintenance-NotebookInstanceExecutionRol-YVBYTBKPP92H. Please ensure that the role exists and allows principal 'sagemaker.amazonaws.com' to assume the role. Traceback (most recent call last): File "/var/task/index.py", line 30, in lambda_handler batch_transform_response = run_batch_transform(transform_input) File "/var/task/index.py", line 76, in run_batch_transform sm.create_transform_job(**payload) File "/var/runtime/botocore/client.py", line 357, in _api_call return self._make_api_call(operation_name, kwargs) File "/var/runtime/botocore/client.py", line 661, in _make_api_call raise error_class(parsed_response, operation_name)

This role does not exist, but another one (PredMaint-SolutionBuilder-NotebookInstanceExecutio-EP4DFXR5ZUO6) was created by the Cloudformation template.

vishaalkapoor commented 4 years ago

Hi @mstfldmr I haven't been able to recreate this issue. Can you confirm if it's still occurring and the steps you've taken to reach this? Thanks!

Additionally note my last comment from Issue #6

Note: the AWS Solution will be officially updated early next week. Code is merged into GitHub in the meantime. To use this code, you'll need to git clone this repository into SageMaker, for example via the terminal or using Git integration. Feel free to ping me if you have questions.

vishaalkapoor commented 4 years ago

Hi @mstfldmr, we were able to re-create the issue. A fix has been checked in and is being deployed to the official soln. You can git clone within your workspace to pull the latest code.

Commit 52b85fe**

sojiadeshina commented 4 years ago

This fix is now released on the official solution page on AWS solutions so you can redeploy from there: https://aws.amazon.com/solutions/implementations/predictive-maintenance-using-machine-learning/. Alternatively you can use the quick-launch button in the README of this repository to get the latest version via github.