aws-batch JobDefinition: Support import using 'fromJobDefinitionName'
See original GitHub issueCurrently JobDefinition
constructs only supports fromJobDefinitionArn
. For using Batch
in StepFunctions
, we can provide JobDefinition
as any one of name
, name:revision
or ARN
(Ref)
Now to import JobDefinition
in StepFunctions
, we can only use fromJobDefinitionArn
which is not flexible since JobDefinitionArn
contains the revision
as well. This leads to an ARN update after every change in revision (very frequent). The ideal way to handle this would be to import using name
instead of the ARN
Hence a method like fromJobDefinitionName
would suit this particular use case.
Use Case
Proposed Solution
Other
- 👋 I may be able to implement this feature request
- ⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:10 (10 by maintainers)
Top Results From Across the Web
AWS::Batch::JobDefinition - AWS CloudFormation
Use the AWS CloudFormation AWS::Batch::JobDefinition resource for Batch. ... For tags with the same name, job tags are given priority over job definitions...
Read more >aws.batch.JobDefinition - Pulumi
JobDefinition resource with examples, input properties, output properties, ... aws.batch.JobDefinition. Provides a Batch Job Definition resource.
Read more >AWS::Batch::JobDefinition - Amazon CloudFormation
For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from...
Read more >aws_batch_job_definition | Resources | hashicorp/aws
Import. Batch Job Definition can be imported using the arn , e.g., $ terraform import aws_batch_job_definition.test arn:aws:batch: ...
Read more >aws-cdk.aws-batch-alpha 2.56.0a0 - PyPI
All batch jobs are processed within a compute environment, which uses ... To import an existing batch job definition from its name, call...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@iliapolo What I was trying to refer to in the issue was:
Consider the scenario where the
JobDefinition
is maintained in a different stack altogether. It has its own lifecycle of code changes and the version is bumped every now and then. We want to use the latest version of the thisJobDefinition
is another stack forStepFunctions
.To achieve this, let’s say we made a stack export of
JobDefinitionArn
from theJobDefinition
stack and then used it inStepFunctions
stack using:Now, when there is a code change and version updates for the
JobDefinition
, it changes the theARN
(sinceARN
contains version number). This leads to deployment failure for theJobDefinition
stack since it would say theexport
is currently used in another stack (StepFunctions
stack). To resolve this, we would have to remove the reference of that export from theStepFunctions
stack and then redeploy. We have to do this for every code change inJobDefinition
.To prevent this issue,
StepFunction
forBatch
supports passing only theJobDefinitionName
as well. But this is currently not possible since to import aJobDefinition
from one stack to another, it only supportsfromJobDefinitionArn
. Therefore we would probably needfromJobDefinitionName
inBatch
.I hope it was clear.
Added a PR https://github.com/aws/aws-cdk/pull/10448 to close this issue.