Properly clean up all Weather Platform resources to avoid ongoing charges. Amplify’s CloudFormation-based infrastructure makes cleanup straightforward with simple commands.
# Single command to delete entire sandbox environment
npx ampx sandbox delete --profile ws1-amplify
# Delete production deployment
npx ampx pipeline-deploy --branch main --appId <your-app-id> --delete --profile ws1-amplify
Amplify automatically removes:
Some resources may need manual deletion:
# Delete IoT policies
aws iot delete-policy --policy-name WeatherStationPolicies --profile ws1-amplify
aws iot delete-policy --policy-name WeatherPlatformPubSubPolicy --profile ws1-amplify
# Delete IoT Rule
aws iot delete-topic-rule --rule-name WeatherTelemetryToS3Rule --profile ws1-amplify
# Delete Thing Group
aws iot delete-thing-group --thing-group-name ITeaWeatherHub --profile ws1-amplify
# Empty and delete data lake bucket
aws s3 rm s3://itea-weather-data-lake-storage-yourname --recursive --profile ws1-amplify
aws s3 rb s3://itea-weather-data-lake-storage-yourname --profile ws1-amplify
After cleanup, verify all resources are deleted:
AWS Console Verification:
CLI Verification:
# Check remaining S3 buckets
aws s3 ls --profile ws1-amplify | grep weather
# Check remaining Lambda functions
aws lambda list-functions --profile ws1-amplify | grep weather
# Check CloudFormation stacks
aws cloudformation list-stacks --profile ws1-amplify | grep amplify
Post-cleanup verification:
Amplify Advantage: Unlike manual AWS setups, Amplify’s CloudFormation-based approach ensures complete and reliable cleanup of all related resources.
If standard cleanup fails:
# Force delete CloudFormation stacks
aws cloudformation delete-stack --stack-name amplify-<app-name> --profile ws1-amplify
# List and manually delete remaining resources
aws resourcegroupstaggingapi get-resources --tag-filters Key=amplify:project-name --profile ws1-amplify
Complete cleanup ensures you avoid the platform monthly cost. For detailed cost analysis, see the Pricing Plan section.