```ts
import { Auth } from 'aws-amplify';
export async function fetchDevices() {
try {
const result = await Auth.fetchDevices();
console.log(result);
} catch (err) {
console.log('Error fetching devices', err);
}
}
```
```js
import { Auth } from 'aws-amplify';
async function fetchDevices() {
try {
const result = await Auth.fetchDevices();
console.log(result);
} catch (err) {
console.log('Error fetching devices', err);
}
}
```