This functionality of "UPSERT" type does not exist in CFn natively. You would need to use a Custom Resource to handle this logic. One alternative that is not exactly what you asked for but might be a decent compromise is to use a Parameter to supply the endpoint if it does exist. Then use a condition to check the value. If the paramter is blank then create an endpoint if not use the value supplied. I know this is not what you asked for but it allows you to avoid the custom resource solution.
Sample of similiar UPSERT example for a VPC:
Parameters : Vpc: Type: AWS::EC2::VPC::Id Conditions: VpcNotSupplied: !Equals [!Ref Vpc, ''] Resources: NewVpc: Type: AWS::EC2::VPC Condition: VpcNotSupplied Properties: CidrBlock: 10.0.0.0/16 SecurityGroup: Type: AWS::EC2::SecurityGroup Properties: GroupDescription: Sample GroupName: Sample VpcId: !If [VpcNotSupplied, !Ref NewVpc, !Ref Vpc ]
Vpc input parameter can be supplied if the VPC you wish to use already exists, left blank if you want to create a new one. The NewVPC resource uses the
Condition to only create if the supplied Vpc parameter value is blank. The Security group then uses the same condition to decide whetehr to use and existing Vpc or the newly created one.
Hope this makes sense.
SageMaker with multiple modelsAccepted Answerasked 2 years ago
Cloudformation Deployment for Serverless Sagemaker Model Endpointasked 3 months ago
How to create a sagemaker serverless endpoint via cloudformation?asked 2 days ago
Sagemaker Asynchronous Endpoint ConfigurationAccepted Answerasked 4 months ago
Create or update Sagemaker Endpoint via CloudFormationAccepted Answerasked 2 years ago
how to trigger sagemaker pipeline via code change in github?asked 16 days ago
Yolo5 model deployment into SageMaker endpointasked 21 days ago
Does SageMaker Multi-Model Endpoint support SageMaker Model Monitor?Accepted AnswerEXPERTasked 2 years ago
is it possible to create steps within the sagemaker pipeline via cloudformation?asked 11 days ago
Can Sagemaker-trained models be deployed to non-Sagemaker endpoints?asked a year ago