Denial-of-service (DoS) attacks on the safety-critical Internet of Things (IoT) can lead to life-threatening consequences, and the risk of these attacks is increasing. We propose levels of context awareness to address availability threats and illustrate how context-aware edge computing enhances the IoT?s resilience to DoS attacks through our edge-computing-based security solution.