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

Create ecs-service from ecs-cli #1156

Open
leonarac opened this issue Feb 27, 2023 · 0 comments
Open

Create ecs-service from ecs-cli #1156

leonarac opened this issue Feb 27, 2023 · 0 comments

Comments

@leonarac
Copy link

Hi all, I'm using ecs-cli to deploy a ecs-service currently I'm deploying as follows:

I have the files docker-compose.yml and ecs-params.yml and run the following command the service is created correctly in ecs, but for some reason the tasks that are deployed remain without a role assigned even though I am sending the --role flag and it exists in the aws environment

Description

  • specific command ecs-cli compose --project-name ecstestcli --file docker-compose.yml service up --target-group-arn arn:aws:elasticloadbalancing:us-east-1:xxxxxxxx:targetgroup/target-group/xxxxxxxx --deployment-max-percent 200 --deployment-min-healthy-percent 100 --disable-ecs-managed-tags --health-check-grace-period 0 --scheduling-strategy REPLICA --container-name task_auth --container-port 8001 --role arn:aws:iam::xxxxxx:role/test-ecs-role --cluster test-ecs-cluster

Version of the CLI ecs-cli version 1.21.0
Platform to run ECS CLI command : Windows

Config files

  • docker-compose.yml

version: '3'
services:
task_auth:
environment:
AWS_API_VERSION: "2016-04-19"
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI: /creds
COGNITO_AWS_ACCESS_KEY: xxxxxxxx
COGNITO_AWS_SECRET_KEY: xxxxx
COGNITO_CLIENT_ID: xxxxxxx
COGNITO_POOL_ID: us-east-1_xxxxx
COGNITO_REGION: us-east-1
ECS_CONTAINER_METADATA_URI: http://169.xxxxx/v3
EMAIL_SEND: mail@web.com
PORT: "8000"
FRONT_URL: https://web.com/
SES_AWS: "false"
image: <URL_IMAGE>
ports:
- "8000:8000"
logging:
driver: awslogs
options:
awslogs-group: /ecs/auth_service
awslogs-region: us-east-1
awslogs-stream-prefix: ecs`

  • ecs-params.yml

version: 1
task_definition:
ecs_network_mode: bridge
task_role_arn: arn:aws:iam::xxxxxx:role/test-ecs-role
task_execution_role: arn:aws:iam::xxxxxx:role/test-ecs-role
services:
task_auth:
cpu_shares: 0
mem_reservation: 134217728

Expected Behavior

Observed Behavior

,

imagen

imagen

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

No branches or pull requests

1 participant