Public Cloud/AWS

SageMaker로 Fraud Detection 구현할 때 오류들

서머스 2022. 8. 19. 09:19

1. Template 파일이 없음

원래는 SageMaker에 탬플릿으로 있었던 샘플 중 하나인데, 아예 Fraud Detector라는 새로운 서비스로 생겨나면서, 이 샘플 자체가 deprecated 된 것 같다. 2년 전인데도 이렇다니..

AWS CloudFormation template - Fraud Detection Using Machine Learning

 

AWS CloudFormation template - Fraud Detection Using Machine Learning

AWS CloudFormation template This solution uses AWS CloudFormation to automate the deployment of the Fraud Detection Using Machine Learning solution on the AWS Cloud. It includes the following AWS CloudFormation template, which you can download before deplo

docs.aws.amazon.com

못찾았는데 여기 있었다.

 

2. Template Stack 생성 시 오류

분명히 빨간 줄이 뜨는데, lambda쪽의 오류를 읽어 보면 python 3.6 is no longer supported 라고 되어 있다.

template 파일을 수정해 주면 되는데, 메모장으로 연 뒤, 직접 수정해주면 된다.

 

3. 1번째 줄에서

Command 'b'wget https://s3-us-west-2.amazonaws.com/sagemaker-e2e-solutions/fraud-detection/creditcardfraud.zip\nunzip creditcardfraud.zip\n'' returned non-zero exit status 1. 

오류 발생할 때

 

-> 그냥 무시하고 2번째부터 계속 진행하면 된다.

 

4. ClientError: An error occurred (ValidationException) when calling the CreateEndpointConfig operation: Cannot create already existing endpoint configuration ~

 

ClientError: An error occurred (ValidationException) when calling the CreateEndpointConfig operation: Cannot create already existing endpoint configuration "arn:aws:sagemaker:ap-northeast-2:056332668609:endpoint-config/fraud-detection-endpoint".

기존에 있는 endpoint configuraiton가 새로 생기는 것과 충돌해서 나는 문제

돌렸던 코드를 또 돌리면 이런 오류가 뜬다.

 

"arn:aws:sagemaker:ap-northeast-2:056332668609:endpoint-config/fraud-detection-endpoint"

 

SageMaker에서 Endpoints, Endpoint configuration으로 가서 아이디 확인 후 삭제하고 다시 run 해본다.