Skip to content

Cloud formation template deploy fails (first command of the tutorial) #469

@fabiobeoni

Description

@fabiobeoni

Running from Cloud Shell

aws cloudformation create-stack --stack-name Observability-Workshop \
   --template-body file://codepipeline-stack.yaml \
   --capabilities CAPABILITY_NAMED_IAM \
   --parameters ParameterKey=UserRoleArn,ParameterValue=$(aws iam get-role --role-name $(aws sts get-caller-identity --query Arn --output text | awk -F/ '{print $(NF-1)}') --query Role.Arn --output text) 

Error:

An error occurred (ValidationError) when calling the GetRole operation: The specified value for roleName is invalid. It must contain only alphanumeric characters and/or the following: +=,.@_-

The first nested command aws sts get-caller-identity returns my user arn, the second one aws iam get-role --role-name uses my user Arn as value of the --role-name and that gets the error above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions