Hi. It's not clear from your question what your architecture is, but please be aware of AWS IoT Core quotas, especially these message broker limits: https://docs.aws.amazon.com/general/latest/gr/iot-core.html#message-broker-limits. You may be getting throttled. As an example, the "Publish requests per second per connection" limit means that for any one client/device connection, only 100 messages per second is possible.
Is it because lots of devices are connected to a single thing?
Devices don't connect to a Thing in the IoT Core registry. They connect to the IoT Core endpoint and the message broker, as a particular client ID (and that usually matches a Thing name). It's not possible to have multiple connections using the one client ID. Each device will have a unique client ID.
Can you please elaborate on your architecture? What is publishing to the topic and what is subscribing? How many clients are subscribing? You mentioned your EC2 instance, but it's not clear if it is a publisher or subscriber. How many messages per second are you trying to publish to the topic?
I used Thing API directly
AWS doesn't have anything called "Thing API" so can you please provide more details?
What is the point of the Thing in the PubSub tutorial?asked 3 months ago
AWS IoT Thing Connected Event, Find the thing Name from Event.asked 5 days ago
Simple IoT Core thing rule and SiteWise property alias ingestion configAccepted Answerasked 3 months ago
aws iot thing disconnect notificationasked 3 months ago
[greengrass]deploy the component from thing group to thingasked a month ago
smart home iot thing trouble publishing from lambda to iot thingasked 3 years ago
How to get the Thing Activity data, AWS IoTasked 2 years ago
IoT thing auto reconnect using python SDKasked 2 months ago
AWS IOT thing packet missingasked 2 months ago
How do Thing names work in IoT?Accepted Answerasked 7 months ago