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 #3255

Closed
gaurav-agarwal27 opened this issue May 15, 2020 · 3 comments
Labels
closed-for-staleness third-party This issue is related to third-party libraries or applications.

Comments

@gaurav-agarwal27
Copy link

If you still like to open an issue, change [ ] to [x] below:

  • [] I've confirmed that I'm using latest version of SDK, and issue is still reproducible

I am using Github Actions to automate deploy the task to ECS. Passed S3 ARN as environmentFiles in ECS console, and it seems to work fine. But the same task-definition JSON doesn't work when using aws-actions/amazon-ecs-deploy-task-definition@v1

environmentFiles reference pull requests on aws/amazon-ecs-agent repo: #2420, #2421

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]```
@ajredniwja ajredniwja added the third-party This issue is related to third-party libraries or applications. label May 15, 2020
@ajredniwja
Copy link
Contributor

Hey @gaurav-agarwal27 thank-you for reaching out, how are you consuming the JS-SDK in this?
Should be an issue for https://github.com/aws/amazon-ecs-agent

@ajredniwja ajredniwja added the response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days. label May 15, 2020
@gaurav-agarwal27
Copy link
Author

Hi @ajredniwja, like I mentioned I am using Github Action aws-actions/amazon-ecs-deploy-task-definition@v1 for automated deployment to ECS. 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 related to environmentFiles either.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days. label May 17, 2020
@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

@ajredniwja ajredniwja added the closing-soon This issue will automatically close in 4 days unless further comments are made. label May 18, 2020
@github-actions github-actions bot added closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness third-party This issue is related to third-party libraries or applications.
Projects
None yet
Development

No branches or pull requests

3 participants