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

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

Closed
gaurav-agarwal27 opened this issue May 15, 2020 · 12 comments
Assignees
Labels
dependencies Pull requests that update a dependency file

Comments

@gaurav-agarwal27
Copy link

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]```
@gaurav-agarwal27 gaurav-agarwal27 changed the title Failed to register task definition in ECS Unexpected key 'environmentFiles' : Failed to register task definition in ECS May 15, 2020
@piradeepk piradeepk added the dependencies Pull requests that update a dependency file label May 15, 2020
@piradeepk
Copy link
Contributor

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.

@piradeepk piradeepk self-assigned this May 15, 2020
@gaurav-agarwal27
Copy link
Author

Thanks @pkandasamy91 , also I am not sure if the latest version of AWS SDK supports environmentFiles yet ?

@clareliguori
Copy link
Member

Hi @gaurav-agarwal27, that feature is not fully released yet, which is why it isn't yet in the SDK. Please watch this roadmap issue for updates on when it is released:
aws/containers-roadmap#371

@gaurav-agarwal27
Copy link
Author

Thanks for the update @clareliguori

@piradeepk
Copy link
Contributor

@piradeepk
Copy link
Contributor

@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.

@gaurav-agarwal27
Copy link
Author

@pkandasamy91 thank you so much for the prompt action. Everything is working fine now 😃
Closing the issue.

s3cube pushed a commit that referenced this issue Jul 16, 2024
Bumps [jest](https://github.com/facebook/jest) from 26.4.2 to 26.5.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](jestjs/jest@v26.4.2...v26.5.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@spencer-shake
Copy link

spencer-shake commented Jan 8, 2025

I'm currently having this same issue, except with enableFaultInjection, which is getting automatically added to the task-definition by this process.
image

Edit: upgrading from v1 to v2 for aws-actions/amazon-ecs-deploy-task-definition@v2 solved this for me

@edbentinck
Copy link

I'm currently having this same issue, except with enableFaultInjection, which is getting automatically added to the task-definition...

Same here. In my case I solved it by upgrading from v1 to v2: aws-actions/amazon-ecs-deploy-task-definition@v2

@spencer-shake
Copy link

I'm currently having this same issue, except with enableFaultInjection, which is getting automatically added to the task-definition...

Same here. In my case I solved it by upgrading from v1 to v2: aws-actions/amazon-ecs-deploy-task-definition@v2

Just came back here to say the same thing. Bumping to v2 worked for me as well

@Ahmad-anility
Copy link

We are on v2. We have been on v2 for a long time but suddenly started to get this error

@ereid7
Copy link

ereid7 commented Jan 9, 2025

@piradeepk This issue should be reopened. We started experiencing the error mentioned in #64 (comment) with no changes on our end. Upgrading to aws-actions/amazon-ecs-deploy-task-definition@v2 fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

7 participants