func-api-firmware-delete
Description
Initiates deletion of a firmware build by removing its ZIP file from S3. The function returns 202 Accepted immediately; the DynamoDB status update happens asynchronously when the S3 delete event triggers func-s3-firmware-deleted.
Before deleting, the function checks the current release_status:
- If the firmware is
DELETED,REVOKED, orRELEASED, it returns409 Conflict.RELEASEDfirmware must be transitioned toREVOKEDviaPATCH /firmware/{zip_name}/statusbefore it can be removed. - If the firmware is in
ERRORstate, the file is deleted from theerrors/prefix. All other states use theprocessed/prefix.
The status transition (anything other than RELEASED → DELETED) is determined and applied by func-s3-firmware-deleted, not by this function.
Invocation
Invoked by API Gateway on an HTTP DELETE /firmware/{zip_name} request.
Sequence Diagram
API Endpoints
| Method | Path | Description |
|---|---|---|
DELETE | /firmware/{zip_name} | Initiates deletion; returns 202 immediately |
See the API Reference for full schema documentation.
Deployment
See the deployment workflow documentation for workflow steps, infrastructure dependencies, and failure scenarios.