Basically, for testing, I used the ngrok server to make requests to my Python Flask server and added the HTTPS delivery type subscription to the AWS SNS topic. In this case, for subscription confirmation, it triggered the endpoint, and that endpoint holds the SubscribeURL value. You need to put that value in the confirm subscription. for more details use this link
https://docs.aws.amazon.com/sns/latest/dg/sns-create-subscribe-endpoint-to-topic.html