When an outbound contact is initiated in Amazon Connect, the dial request is processed immediately and then connected to a contact flow after the call is setup. This means that there is no opportunity to defeat the dialing request after the dialing client has sent the request. If you need to process logic to deny the dialing request, it would need to be done in the client prior to the request being sent to then Amazon Connect APIs.
There are 2 APIs that allow contacts to be created/initiated; the one that is used by web-based interfaces (like the Amazon Connect Contact Control Panel) which agents use, and the Outbound API that is part of the AWS SDK (which is meant for automated dialing applications). If your use case is preventing agents from dialing numbers on Do Not Call lists, then you can use the Streams API to create a custom dialing interface for the agents and only allow the dialing request to be sent after you check your Do Not Call blacklist.
You could use Amazon API Gateway to expose an HTTP interface to your Lambda code using the Lambda Proxy (see documentation here). When an agent clicks the dial button in your custom interface, you can call the API Gateway method to check the number against your DNC list. If the number is not found in the DNC list, then you would process the dialing request with the agent.connect() function of the Streams API (example below).
agent.connect(Endpoint.byPhoneNumber("5558675309"), {
success: function() { ... },
failure: function() { ... }
});