Description
When creating the environment with the following options:
copilot env init --app loooooooooooong-app-name --name loooooooooooooooong-svc-name --prod --region us-est-1 --import-vpc-id vpc-xxxxx --import-public-subnets subnet-xxxx,subnet-xxxx --import-private-subnets subnet-xxxxx,subnet-xxxx
The Stack fails with the error:
CloudformationExecutionRole - 1 validation error detected: Value 'loooooooooooong-app-name-loooooooooooooooong-svc-name-CFNExecutionRole' at 'roleName' failed to satisfy constraint: Member must have length less than or equal to 64 (Service: AmazonIdentityManagement; Status Code: 400; Error Code: ValidationError; Request ID: fcbbe450-65fc-4cd5-b65b-1e9b539f22d7; Proxy: null)
Cfn Template: CloudformationExecutionRole: Metadata: 'aws:copilot:description': 'An IAM Role for AWS CloudFormation to manage resources' DeletionPolicy: Retain Type: AWS::IAM::Role Properties: RoleName: !Sub ${AWS::StackName}-CFNExecutionRole
Expected Behavior:
Copilot CLI should validate that len(app-name) + len(svc-name) + len('-CFNExecutionRole') <= 64 and warn the user, before submiting the CFn template