Amplify has re-imagined the way frontend developers build fullstack applications. Develop and deploy without the hassle.

Page updated May 3, 2024

Delete data

DELETE requests

To delete an item via the API endpoint:

import { del } from 'aws-amplify/api';
async function deleteItem() {
try {
const restOperation = del({
apiName: 'myRestApi',
path: 'items/1'
await restOperation.response;
console.log('DELETE call succeeded');
} catch (e) {
console.log('DELETE call failed: ', JSON.parse(e.response.body));