-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
feat(stepfunctions-tasks): support for the step functions mediaconvert optimized integration for createJob api #30300
feat(stepfunctions-tasks): support for the step functions mediaconvert optimized integration for createJob api #30300
Conversation
…t optimized integration for createJob api
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.
Generally looks good, left some questions.
const policyStatements = [ | ||
new iam.PolicyStatement({ | ||
actions: ['iam:PassRole'], | ||
resources: ['*'], |
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.
Is there a way we can constraint the resource to not be a *
?
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.
Now that I think about it, we can constraint the resource to the Role
specified in the createJobRequest
like below:
resources: [this.props.createJobRequest.Role],
conditions: {
StringLike: { 'iam:PassedToService': 'mediaconvert.amazonaws.com' },
},
Updating in next revision.
protected readonly taskMetrics: sfn.TaskMetricsConfig | undefined; | ||
protected readonly taskPolicies: iam.PolicyStatement[] | undefined; |
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.
How is taskMetrics
used?
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.
taskMetrics
is an abstract member of TaskStateBase class (packages/aws-cdk-lib/aws-stepfunctions/lib/states/task-base.ts
) that can be used to attach any metrics for the task. We are not planning to add any metrics specific to this MediaConvertCreateJob task.
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.
If not used in MediaConvertCreateJob
, I think we can safely remove this line?
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.
Removing the line gives TS18052 Non-abstract class 'MediaConvertCreateJob' does not implement all abstract members of 'TaskStateBase' error
* Properties for creating a MediaConvert Job | ||
* | ||
* See the CreateJob API for complete documentation | ||
* @see https://docs.aws.amazon.com/mediaconvert/latest/apireference/jobs.html#jobspost |
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.
Is this link correct? I opened this link, but not sure if it's related to the create job api.
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.
Yes, the link https://docs.aws.amazon.com/mediaconvert/latest/apireference/jobs.html#jobspost talks about the POST Operation CREATEJOB API that creates a new transcoding job in MediaConvert service.
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.
LGTM, thanks!
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…t optimized integration for createJob api (aws#30300) Step Functions recently released an [Optimized Integration for MediaConvert CreateJob API](https://docs.aws.amazon.com/step-functions/latest/dg/connect-mediaconvert.html) and these changes add support for the MediaConvert CreateJob task to Step Functions state machines. ### Issue # (if applicable) Closes [aws#30299](aws#30299) ### Reason for this change The aws-stepfunctions-tasks now needs to support creating MediaConvert CreateJob tasks ### Description of changes Added a new L2 construct for MediaConvert Create-Job Task: ``packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/mediaconvert/create-job.ts`` ### Description of how you validated changes Unit test - ``packages/aws-cdk-lib/aws-stepfunctions-tasks/test/mediaconvert/create-job.test.ts`` Integration test - ``packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/mediaconvert/test/integ.create-job.ts`` Verified the State Machine with MediaConvert CreateJob Task with all the necessary permissions ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…t optimized integration for createJob api (aws#30300) Step Functions recently released an [Optimized Integration for MediaConvert CreateJob API](https://docs.aws.amazon.com/step-functions/latest/dg/connect-mediaconvert.html) and these changes add support for the MediaConvert CreateJob task to Step Functions state machines. ### Issue # (if applicable) Closes [aws#30299](aws#30299) ### Reason for this change The aws-stepfunctions-tasks now needs to support creating MediaConvert CreateJob tasks ### Description of changes Added a new L2 construct for MediaConvert Create-Job Task: ``packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/mediaconvert/create-job.ts`` ### Description of how you validated changes Unit test - ``packages/aws-cdk-lib/aws-stepfunctions-tasks/test/mediaconvert/create-job.test.ts`` Integration test - ``packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/mediaconvert/test/integ.create-job.ts`` Verified the State Machine with MediaConvert CreateJob Task with all the necessary permissions ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Step Functions recently released an Optimized Integration for MediaConvert CreateJob API and these changes add support for the MediaConvert CreateJob task to Step Functions state machines.
Issue # (if applicable)
Closes #30299
Reason for this change
The aws-stepfunctions-tasks now needs to support creating MediaConvert CreateJob tasks
Description of changes
Added a new L2 construct for MediaConvert Create-Job Task:
packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/mediaconvert/create-job.ts
Description of how you validated changes
Unit test -
packages/aws-cdk-lib/aws-stepfunctions-tasks/test/mediaconvert/create-job.test.ts
Integration test -
packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/mediaconvert/test/integ.create-job.ts
Verified the State Machine with MediaConvert CreateJob Task with all the necessary permissions
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license