AWS CloudFormation에서 리소스 공급자 유형을 사용하여 리소스를 만들 때 "Resource timed out waiting for creation of physical resource" 오류를 해결하려면 어떻게 해야 합니까?
최종 업데이트 날짜: 2020년 8월 17일
AWS CloudFormation에서 리소스 공급자 유형을 사용하여 리소스를 만들 때 스택 이벤트에서 "Resource timed out waiting for creation of physical resource" 오류가 발생합니다. 이 오류를 해결하려면 어떻게 해야 합니까?
간략한 설명
리소스가 60초 이내에 primaryIdentifier 또는 물리적 ID를 반환하지 않는 경우 AWS CloudFormation은 "Resource timed out waiting for creation of physical resource" 오류를 반환합니다. 이 오류는 리소스의 CreateHandler가 리소스 공급자 스키마 파일 organization-service-resource.json에서 primaryIdentifier로 지정된 속성을 반환하지 않기 때문에 발생합니다.
리소스 공급자 사용과 관련된 다른 오류 때문에 문제를 겪고 있는 경우에는 다음 문서에서 추가적인 문제 해결 단계를 참조하세요.
- AWS CloudFormation에서 CloudFormation CLI를 사용하여 cfn generate 명령을 실행할 때 "Resource specification is invalid" 오류를 해결하려면 어떻게 해야 합니까?
- AWS CloudFormation에서 "Model validation failed (#: extraneous key [Key] is not permitted)" 오류를 해결하려면 어떻게 해야 합니까?
- AWS CloudFormation에서 리소스 공급자 리소스에 Fn::GetAtt 함수를 사용할 때 "Attribute 'Key' does not exist" 오류를 해결하려면 어떻게 해야 합니까?
- AWS CloudFormation에서 "java.lang.ClassNotFoundException: com.example.package.resource.HandlerWrapper" 오류를 해결하려면 어떻게 해야 합니까?
해결 방법
1. organization-service-resource.json 파일에서 primaryIdentifier 정의가 다음 형식을 따르는지 확인합니다. 여기서 Id는 properties 섹션에 정의된 속성입니다.
"primaryIdentifier": [
"/properties/Id"
]
참고: 리소스 공급자 스키마 파일은 organization-service-resource.json 형식의 JSON 파일이며 프로젝트의 루트 디렉토리에 있습니다.
2. CreateHandler에서 model 객체의 primaryIdentifier 속성을 설정합니다. 예를 들어 다음과 같습니다.
final ResourceModel model = request.getDesiredResourceState();
model.setId("abcdxyz");
return ProgressEvent.<ResourceModel, CallbackContext>builder()
.resourceModel(model)
.status(OperationStatus.SUCCESS)
.build();