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

EcsRunTaskPolicy should take ECS ARN, not task definition (family:revision) #1740

Open
smatsumt opened this issue Oct 12, 2020 · 1 comment

Comments

@smatsumt
Copy link
Contributor

Description:

"EcsRunTaskPolicy" policy template in policy_templates.json takes one argument, TaskDefinition. It is assumed to be (family:revision), e.g. "EcsTaskName:1"

But Ref for AWS::ECS::TaskDefinition returns Task's ARN. So, following code would not work.

Resources:
  SomeFunction:
    Type: AWS::Serverless::Function
    Properties:
      Policies:
        - EcsRunTaskPolicy
           TaskDefinition: !Ref SomeECSTaskDefinition

  SomeECSTaskDefinition:
    Type: AWS::ECS::TaskDefinition
    Properties:

If TaskDefinition argument takes ARN format, the above code would work. We can refer ECS task definition in the CloudFormation template.

I think TaskDefinition should takes ARN format. How about it?

@vesahyp
Copy link

vesahyp commented Aug 20, 2021

I am struggling with the same issue. Are there other options currently than hard-coding the TaskDefinition into the template by hand?

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

No branches or pull requests

5 participants