Clean up resources
Clean Up Resources
We will take the following steps to delete the resources we created in this exercise.
Delete Rekognition Resources
AWS Rekognition resources cannot be deleted from the AWS Management Console.
You must delete them using the AWS CLI or by writing code that calls the appropriate Rekognition API.
Delete Face Collections
aws rekognition delete-collection --collection-id <collection-id>
Delete S3 Buckets
Go to S3 service console.
Select the buckets you created for:
- Storing face images
- Hosting the frontend
- Any temporary data storage
Click Empty (to remove all objects), then Delete.
Confirm bucket name when prompted.
Remove Amplify Project
From your local project folder:
- Type Y to confirm.
This will remove the backend environment and all associated Amplify-managed resources.
Delete Lambda Functions
Go to Lambda service console.
Select all functions created for:
sessionFunction
livenessResultFunction
indexFaceFunction
listCollectionFunction
deleteFaceFunction
attendanceFunction
Click Actions → Delete.
Delete API Gateway Endpoints
- Go to API Gateway console.
- Select the REST APIs you created.
- Click Actions → Delete.
- Confirm deletion.
Delete CloudFront Distributions
- Go to CloudFront console.
- Select the distribution(s) you created.
- Click Disable, wait until status is Disabled.
- Click Delete and confirm.
Delete CloudWatch Logs
- Go to CloudWatch console.
- Select Log groups.
- Delete all log groups created for your Lambda functions and API Gateway.
Delete DynamoDB Tables (if created)
- Go to DynamoDB console.
- Select any tables created for session storage or attendance tracking.
- Click Delete table, confirm name.