-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(stepfunctions-tasks): allow EcsRunTask on fargate and ec2 to set capacity provider strategy #35465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This review is outdated)
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
@@ -1,3 +1,3 @@ | |||
FROM public.ecr.aws/docker/library/python:3.12 | |||
FROM --platform=linux/amd64 public.ecr.aws/docker/library/python:3.12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because amd64 is used for cpu architecture in integ tests.
If this option is not specified, running the tests on Mac will result in an error during state machine execution.
Issue # (if applicable)
Closes #20013 #30171 #7967
Reason for this change
The capacity provider strategy can't be set on EcsRunTask with
EcsFargateLaunchTargetOptions
andEcsEc2LaunchTargetOptions
.https://docs.aws.amazon.com/ja_jp/AmazonECS/latest/APIReference/API_RunTask.html
Description of changes
This PR adds a new property
capacityProviderOptions
(CapacityProviderOptionsBase
class with static factory methods as an enum-like class) in the target options.The
CapacityProviderOptionsBase
has following sub types:The
NoCapacityProviderOptions
creates the original settings withLaunchType
(EC2
orFARGATE
). It is a default value for thecapacityProviderOptions
.The
CustomCapacityProviderOptions
allows users to set the capacity provider strategy withoutLaunchType
.The
DefaultCapacityProviderOptions
allows users to use the cluster's default capacity provider strategy. The default strategy can be set by specifying no options (LaunchType
andCapacityProviderStrategy
) in CFn.Describe any new or updated permissions being added
Description of how you validated changes
Both unit tests and integ tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license