Long controller names may break deployment with error "Value 'X' at 'roleName' failed to satisfy constraint: Member must have length less than or equal to 64" #160
Hey @tongueroo ,
When IAM role is generated, it is using project name + controller name to build IAM role name, but there's a 64 character constraint on it by AWS, so deployment may fail with a message like this:
1 validation error detected: Value 'patchkit-app-catalog-dev-catalogs-apps-screenshots-controller-role' 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: 8924cd64-1be2-11e9-8391-5d4c146a6728)
Checklist
[x] Upgrade Jets: Are you using the latest version of Jets? This allows Jets to fix issues fast. There's a jets upgrade command that makes this a simple task. There's also an Upgrading Guide: http://rubyonjets.com/docs/upgrading/
[x] Reproducibility: Are you reporting a bug others will be able to reproduce and not asking a question. If you're unsure or want to ask a question, do so on https://community.rubyonjets.com
[x] Code sample: Have you put together a code sample to reproduce the issue and make it available? Code samples help speed up fixes dramatically. If it's an easily reproducible issue, then code samples are not needed. If you're unsure, please include a code sample.
Code Sample
# I believe this one should reproduce it
class Catalogs::Apps::ScreenshotsWithReallyLongNameController < ApplicationController
end
Hey @tongueroo , When IAM role is generated, it is using project name + controller name to build IAM role name, but there's a 64 character constraint on it by AWS, so deployment may fail with a message like this:
Checklist
jets upgrade
command that makes this a simple task. There's also an Upgrading Guide: http://rubyonjets.com/docs/upgrading/Code Sample
Solution Suggestion
Either way: