Cost estimation
The steps-s3-copy includes a cost estimation feature that calculates the expected costs
of the copy operation. When enabled (htmlReport: true), the workflow produces an HTML report
containing cost estimates across three modelled components. Use it for pre-execution planning or
post-run analysis, the report can be saved in the working bucket and destination bucket independently,
making it accessible from both sides of the transfer.
Costs are calculated for three components:
Cross-region transfer — cost applied when source and destination buckets are in different AWS regions. This component models transfer egress charges and destination write request fees. In-region copies are modelled with zero transfer cost.
Cold storage retrieval — charged when an object is in Glacier, Deep Archive, or Intelligent-Tiering archive classes and must be restored before copying. This component models retrieval request and data charges, plus temporary restore storage charges during the restore window. The estimate depends on storage class, object size, retrieval speed (Bulk, Standard, or Expedited), and restore duration.
Compute — covers workflow runtime on Lambda or Fargate (selected according to object size) during the copy step. This component is modelled from object size, assumed throughput, and runtime overhead to estimate execution duration.
Pricing rates are fetched from the AWS Price List API at the start of each workflow run, ensuring cost estimates reflect current rates. The report records the timestamp when pricing data was fetched, and displays the rates used.
Costs are calculated per object, then aggregated by component and presented in total.
Per-object costs are broken down in the results table, showing each of the three cost components separately.

The cost summary panel shows the total estimated cost for the copy operation, broken down by component and presented in a pie chart for easy visualisation.

Cost model
The cost estimation logic is isolated in a dedicated module (cost-estimation.ts),
separate from the workflow orchestration. It models the three cost components (cross-region
transfer, cold storage retrieval, and compute) using AWS Pricing API rates and object metadata,
so pricing behaviour can be developed, tested, and updated independently.
Comprehensive unit tests cover multiple AWS regions, storage classes, and edge cases (including tiered egress and retrieval-speed variants). This keeps model changes safe: assumptions can be validated in isolation, and pricing updates or new scenarios can be introduced.