AWS IOT requires that your device understand TCP/IP and encryption.
The ATMega328 has 2K bytes of RAM, but Ethernet frames can be up to 1500 bytes long. Even if you could receive a packet, there wouldn't be any room left to process it.
The nRF51822 has 16K RAM, which is plenty for Ethernet, but not enough to do TCP/IP and WiFi. (Both of which require storing a lot of state.)
The smallest practical device with WiFi+TCP/IP is the ESP8266, which has 96K of RAM. Even then, you generally can only have one TCP connection at a time. They are getting cheaper all the time ($2). In fact, trying to add WiFi to an AtMega will mean you are adding a processor at least as big as the ESP8266. Some Arduino WiFi adapters have 10x the power of an ESP8266 (and 10x the price).