Skip to content
This repository was archived by the owner on Nov 19, 2025. It is now read-only.
This repository was archived by the owner on Nov 19, 2025. It is now read-only.

Invalid principal in policy when using ecs-cli up #552

@keryhu

Description

@keryhu

first :

ecs-cli configure --cluster test --region cn-northwest-1 --default-launch-type EC2 --config-name test

then : ecs-cli configure profile --access-key XXXX --secret-key XXX --profile-name test

and config and credentials are saved in ~/.aws

but : ecs-cli configure --cluster test --region cn-northwest-1 --default-launch-type EC2 --config-name test

(when I use web console , I can create new cluster )

there is Err:

INFO[0001] Using recommended Amazon Linux AMI with ECS Agent 1.18.0 and Docker version 17.12.1-ce
INFO[0002] Created cluster                               cluster=test region=cn-northwest-1
INFO[0002] Waiting for your cluster resources to be created...
INFO[0002] Cloudformation stack status                   stackStatus=CREATE_IN_PROGRESS
ERRO[0033] Failure event                                 reason="Invalid principal in policy: \"SERVICE\":\"ec2.amazonaws.com\" (Service: AmazonIdentityManagement; Status Code: 400; Error Code: MalformedPolicyDocument; Request ID: e7556023-7f3b-11e8-8fe6-6d98210db076)" resourceType="AWS::IAM::Role"
FATA[0033] Error executing 'up': Cloudformation failure waiting for 'CREATE_COMPLETE'. State is 'ROLLBACK_IN_PROGRESS'


ecs-cli --version: ecs-cli version 1.6.0 (95406b1)
go version go1.10.2 darwin/amd64
osx

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions