question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unexpected key 'environmentFiles' : Failed to register task definition in ECS

See original GitHub issue

Using aws-actions/amazon-ecs-deploy-task-definition@v1 I have added environmentFiles in my containerDefinitions of task-definition.json as:

"environmentFiles": [{
    "type": "s3",
    "value": "arn:aws:s3:::ltl-environments/.stg.env"
}],

Getting the following error:

##[error]Failed to register task definition in ECS: There were 5 validation errors:
* UnexpectedParameter: Unexpected key 'environmentFiles' found in params.containerDefinitions[0]
* UnexpectedParameter: Unexpected key 'environmentFiles' found in params.containerDefinitions[2]
* UnexpectedParameter: Unexpected key 'environmentFiles' found in params.containerDefinitions[3]
* UnexpectedParameter: Unexpected key 'environmentFiles' found in params.containerDefinitions[4]
* UnexpectedParameter: Unexpected key 'environmentFiles' found in params.containerDefinitions[5]```

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
piradeepkcommented, May 18, 2020

@gaurav-agarwal27 the dependencies have been updated, and you should now be able to use environmentFiles. Let me know if you’re still running into issues.

1reaction
piradeepkcommented, May 15, 2020

It looks like it might be using an older version of the AWS SDK which does not yet support environmentFiles. Will confirm and provide more details.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unexpected key 'environmentFiles' : Failed to register task ...
This action is using aws-sdk-js to determine which keys are valid in task-definition.js . I checked in aws-sdk-js but couldn't find anything ...
Read more >
RegisterTaskDefinition - Amazon Elastic Container Service
Registers a new task definition from the supplied family and containerDefinitions . Optionally, you can add data volumes to your containers with the...
Read more >
Failed to register task definition in ECS with GitHub Actions
I am setting up a Github Actions CI to AWS Fargate. But facing a permission issue on the step of Deploy Amazon ECS...
Read more >
Task definition causing deploy errors for AWS ECS
I copied the task definition JSON from the actual task definition I created in the AWS console. I pasted this this JSON into...
Read more >
community.aws.ecs_taskdefinition module – register a task ...
The value of the key-value pair. environmentFiles. list / elements=dictionary. A list of files containing the environment variables to pass to a container....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found