You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jyoti-dmi opened this issue
Oct 18, 2023
· 3 comments
Assignees
Labels
authIssues tied to the auth category of the CLIbugSomething isn't workingimportIssues related to importing resources into an Amplify projectp1storageIssues tied to the storage category
To be able to use the service role : arn:aws:iam:::role/service-role/my-role create by the Cognito with Amplify Studio Console to integrate-File storage(i.e. using Create a new S3 bucket).
Describe your use case and how the feature would improve your experience.
When creating the roles using Congito Console, the Cognito console will prepend service-role/ to whatever IAM role name you specify.
For example:
The role arn will be created as: arn:aws:iam::<account-id>:role/service-role/testrole
However, when adding the storage using Amplify Studio Console, it is throwing an error message as mentioned below even if the role name is fine:
The specified value for roleName is invalid. It must contain only alphanumeric characters and/or the following: +=,.@_-
Reproduction steps:
Create a Cognito Identity Pool with defaults specified for Authenticated and Unauthenticated roles using the Cognito console. This will append role arn with service-role/
Go to Amplify Studio Console and after configuring the Cognito authentication, try adding storage(i.e. using Create a new S3 bucket)--> Create Bucket.
Receive exception: The specified value for roleName is invalid. It must contain only alphanumeric characters and/or the following: +=,.@_-
For example:
When I am using another auth/unauth roles(which is in format: arn:aws:iam::<account-id>:role/my-role-name ), then it is getting integrated successfully.
I see here: #12817 that Amplify CLI supports service roles now. Would it be possible to add the same for Amplify Studio Console as well?
Describe alternatives you've considered
When I am using another auth/unauth roles(which is in format: arn:aws:iam::<account-id>:role/my-role-name ), then it is getting integrated successfully.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Hey @Jyoti-dmi, thank you for reaching out. I was able to reproduce this issue. Marking as bug.
Transferring the issue to Amplify CLI repository as I was able to reproduce this using the CLI.
Reproduction steps:
create a user pool and identity pool with auth and unauth roles on the AWS Cognito console.
amplify import auth
amplify push
amplify add storage
amplify push
Observe errors on S3 policies as the template refers to the authRole.
ykethan
added
bug
Something isn't working
auth
Issues tied to the auth category of the CLI
storage
Issues tied to the storage category
import
Issues related to importing resources into an Amplify project
and removed
pending-triage
Issue is pending triage
labels
Oct 18, 2023
Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
authIssues tied to the auth category of the CLIbugSomething isn't workingimportIssues related to importing resources into an Amplify projectp1storageIssues tied to the storage category
Describe the feature you'd like to request
To be able to use the service role : arn:aws:iam:::role/service-role/my-role create by the Cognito with Amplify Studio Console to integrate-File storage(i.e. using Create a new S3 bucket).
Describe your use case and how the feature would improve your experience.
When creating the roles using Congito Console, the Cognito console will prepend service-role/ to whatever IAM role name you specify.
For example:
![Screenshot 2023-10-18 at 3 34 56 PM](https://private-user-images.githubusercontent.com/142494393/276206036-6e55e7fc-ce65-4ea4-8c90-e6a4f26b6114.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NjE5OTcsIm5iZiI6MTczODk2MTY5NywicGF0aCI6Ii8xNDI0OTQzOTMvMjc2MjA2MDM2LTZlNTVlN2ZjLWNlNjUtNGVhNC04YzkwLWU2YTRmMjZiNjExNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwN1QyMDU0NTdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05OGU2NGU0M2U5YjFiYWI3MzE1ZjQwYzZlMDNjMTFjM2UyZmY0N2E2YjQ1ZDQwYzE0YmM2M2Y1Y2FhYWUzNjk1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.rUAvxsQisr_X-HY94Yqm35GTSShx90JaBs9tmOghpLY)
The role arn will be created as:
arn:aws:iam::<account-id>:role/service-role/testrole
However, when adding the storage using Amplify Studio Console, it is throwing an error message as mentioned below even if the role name is fine:
The specified value for roleName is invalid. It must contain only alphanumeric characters and/or the following: +=,.@_-
Reproduction steps:
The specified value for roleName is invalid. It must contain only alphanumeric characters and/or the following: +=,.@_-
For example:
When I am using another auth/unauth roles(which is in format:
arn:aws:iam::<account-id>:role/my-role-name
), then it is getting integrated successfully.I see here: #12817 that Amplify CLI supports service roles now. Would it be possible to add the same for Amplify Studio Console as well?
Describe alternatives you've considered
When I am using another auth/unauth roles(which is in format:
arn:aws:iam::<account-id>:role/my-role-name
), then it is getting integrated successfully.Additional context
No response
The text was updated successfully, but these errors were encountered: