Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions API.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 26 additions & 1 deletion src/containers/ecs/ecs-base-pattern.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ export interface TmApplicationLoadBalancedFargateServiceProps extends ecsPattern
* targetMemoryUtilizationPercent
*/
readonly targetMemoryUtilizationPercent?: number;

/*
* Enable Spot Capacity Provider
*/
Comment on lines +123 to +125
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment uses single-line comment syntax /* instead of the JSDoc format. For consistency with the rest of the interface properties, use JSDoc format /** with a proper description.

Copilot uses AI. Check for mistakes.
readonly enableSpotCapacityProvider?: boolean;
}


Expand Down Expand Up @@ -163,7 +168,27 @@ export class TmApplicationLoadBalancedFargateService extends ecsPatterns.Applica
},
};

const mergedProps = { ...defautProps, ...props };
let capacityProviderStrategies;
if (props.enableSpotCapacityProvider) {
capacityProviderStrategies = [
{
capacityProvider: 'FARGATE',
base: 1,
weight: 0,
},
{
capacityProvider: 'FARGATE_SPOT',
base: 0,
weight: 1,
},
];
}

const mergedProps = {
...defautProps,
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'defautProps' to 'defaultProps'.

Copilot uses AI. Check for mistakes.
...props,
...(capacityProviderStrategies && { capacityProviderStrategies }),
};

super(scope, id, mergedProps);

Expand Down