WirelessGateway
The WirelessGateway resource allows you to manage AWS IoTWireless WirelessGateways for connecting and managing LoRaWAN devices.
Minimal Example
Section titled “Minimal Example”Create a basic WirelessGateway with required properties and one optional property.
import AWS from "alchemy/aws/control";
const basicWirelessGateway = await AWS.IoTWireless.WirelessGateway("basicGateway", { LoRaWAN: { GatewayEui: "01AB23CD45EF67GH", NetId: "010203", // Additional LoRaWAN configuration can be added here }, Name: "MyFirstWirelessGateway", Description: "A basic Wireless Gateway for testing"});
Advanced Configuration
Section titled “Advanced Configuration”Configure a WirelessGateway with advanced options, including tags and last uplink received time.
const advancedWirelessGateway = await AWS.IoTWireless.WirelessGateway("advancedGateway", { LoRaWAN: { GatewayEui: "01AB23CD45EF67GH", NetId: "010203", // Additional LoRaWAN configuration can be added here }, Name: "MyAdvancedWirelessGateway", Description: "An advanced Wireless Gateway with additional configurations", LastUplinkReceivedAt: new Date().toISOString(), Tags: [ { Key: "Environment", Value: "Production" }, { Key: "Project", Value: "IoTDeployment" } ]});
Updating an Existing Gateway
Section titled “Updating an Existing Gateway”Adopt an existing WirelessGateway instead of failing if it already exists.
const existingGateway = await AWS.IoTWireless.WirelessGateway("existingGateway", { LoRaWAN: { GatewayEui: "01AB23CD45EF67GH", NetId: "010203", // Additional LoRaWAN configuration can be added here }, Name: "ExistingWirelessGateway", adopt: true // Adopt existing resource if it exists});
Monitoring Last Uplink Received Time
Section titled “Monitoring Last Uplink Received Time”Create a WirelessGateway which monitors the last uplink received time for maintaining device health.
const monitoredWirelessGateway = await AWS.IoTWireless.WirelessGateway("monitoredGateway", { LoRaWAN: { GatewayEui: "01AB23CD45EF67GH", NetId: "010203", // Additional LoRaWAN configuration can be added here }, Name: "MonitoredWirelessGateway", LastUplinkReceivedAt: new Date().toISOString(), Description: "Wireless Gateway that tracks last uplink received time"});