Skip to content
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

design(aws-ecs): Design doc for creating a scheduled ecs task construct #2363

Closed
wants to merge 1 commit into from

Conversation

piradeepk
Copy link
Contributor

@piradeepk piradeepk commented Apr 23, 2019

Initial Design Doc for a new Scheduled ECS Task Construct

Pull Request Checklist

  • Testing
    • Unit test added (prefer not to modify an existing test, otherwise, it's probably a breaking change)
    • CLI change?: coordinate update of integration tests with team
    • cdk-init template change?: coordinated update of integration tests with team
  • Docs
    • jsdocs: All public APIs documented
    • README: README and/or documentation topic updated
    • Design: For significant features, design document added to design folder
  • Title and Description
    • Change type: title prefixed with fix, feat and module name in parens, which will appear in changelog
    • Title: use lower-case and doesn't end with a period
    • Breaking?: last paragraph: "BREAKING CHANGE: <describe what changed + link for details>"
    • Issues: Indicate issues fixed via: "Fixes #xxx" or "Closes #xxx"
  • Sensitive Modules (requires 2 PR approvers)
    • IAM Policy Document (in @aws-cdk/aws-iam)
    • EC2 Security Groups and ACLs (in @aws-cdk/aws-ec2)
    • Grant APIs (only if not based on official documentation with a reference)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.

@piradeepk piradeepk requested a review from a team as a code owner April 23, 2019 20:30
design/aws-ecs-scheduled-ecs-task-construct.md Outdated Show resolved Hide resolved
design/aws-ecs-scheduled-ecs-task-construct.md Outdated Show resolved Hide resolved
design/aws-ecs-scheduled-ecs-task-construct.md Outdated Show resolved Hide resolved
design/aws-ecs-scheduled-ecs-task-construct.md Outdated Show resolved Hide resolved
design/aws-ecs-scheduled-ecs-task-construct.md Outdated Show resolved Hide resolved
design/aws-ecs-scheduled-ecs-task-construct.md Outdated Show resolved Hide resolved
design/aws-ecs-scheduled-ecs-task-construct.md Outdated Show resolved Hide resolved
design/aws-ecs-scheduled-ecs-task-construct.md Outdated Show resolved Hide resolved
design/aws-ecs-scheduled-ecs-task-construct.md Outdated Show resolved Hide resolved
design/aws-ecs-scheduled-ecs-task-construct.md Outdated Show resolved Hide resolved
@piradeepk
Copy link
Contributor Author

Updated the doc with feedback addressed

@clareliguori
Copy link
Member

Overall LGTM, I only have nit-picks that doesn't block implementation

@piradeepk
Copy link
Contributor Author

@awslabs/aws-cdk-team can you please review and merge in the doc?

@piradeepk
Copy link
Contributor Author

Merging as part of: #2336

@piradeepk piradeepk closed this Apr 29, 2019
Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

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

would it make sense to decouple the “scheduling” aspect from the task. If a user wishes to execute an ECS task by publishing into an SNS topic for example or as a result of some other CW event rule, what’s their path? I imagined an API where you can simply use an ECS task as an event rule target, which indirectly means that you can also execute it on schedule by simply creating an event rule with a schedule, similarly to Lambda.

@piradeepk piradeepk reopened this Apr 30, 2019
@piradeepk
Copy link
Contributor Author

That sounds like a lower level construct,

would it make sense to decouple the “scheduling” aspect from the task. If a user wishes to execute an ECS task by publishing into an SNS topic for example or as a result of some other CW event rule, what’s their path? I imagined an API where you can simply use an ECS task as an event rule target, which indirectly means that you can also execute it on schedule by simply creating an event rule with a schedule, similarly to Lambda.

Are you thinking about a construct that accepts an existing task definition, instead of constructing a task def or to be able to schedule using different methods (CW Events, SNS events, etc)? The purpose of this construct is to allow customers to create scheduled tasks using cw events (create new tasks, not using existing tasks).

@clareliguori
Copy link
Member

To me it sounds like @eladb's suggestion already exists at the L2 level with ecs.Ec2EventRuleTarget:
https://awslabs.github.io/aws-cdk/refs/_aws-cdk_aws-ecs.html#integration-with-cloudwatch-events

I agree with @pkandasamy91: this is intended to be a higher-level construct to make it super simple to do a scheduled task. Most ECS users triggering a task with CloudWatch Events are doing it on a schedule.

@eladb
Copy link
Contributor

eladb commented May 2, 2019

Got it. Thanks for the clarification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants