-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BootstrapDetectionError: Unable to detect CDK bootstrap stack due to permission issues. On backend build Unable to deploy monorepo. #2222
Comments
Hey @crafael23, thank you for reaching out. From the build logs the message
indicating the role may have been deleted or this may also occur if the account has Service Control Policies that could be enforced on the IAM user/role on an account level within the organization. Does local sandbox throw a similar error message? |
@ykethan , for the moment local sandbox doesn't produce the same error I do have other proyects hosted, a nextjs app and a little react SPA. Its only this one that gives the the problem, if I remove backend deployment completely from te amplify.yml the problem goes away. |
@ykethan btw, because this is a test that I'm doing, I'm doing this on my personal root account. I've not touched Service control Policies. |
|
Hey @crafael23, thank you for the information. For a quick confirmation, does the app have a service role attached in the general settings? as i did run into this error message when the service role was not present, on attaching the role the deployment was successfull |
@ykethan , the field for the service role is empty for this app. Comparing it to the other react spa that i have there is no differnece, but comparing it to another nextjs app that i have deployed it appears to only have AmplifySSRLoggingRole. Ill try adding the deploy role. |
@crafael23 does the service role attached have AmplifyBackendDeployFullAccess attached to it? i was able to deploy the KinuQ/kinuqmono app using the following yml and the service role attached
|
@ykethan CDK deploy role doesnt have the amplify AmplifyBackendDeployFullAccess It just has a default role with this description
Ill try it out in a second. |
This is happening now @ykethan |
@crafael23 i was able to deploy this successfully using the following. could you try this and let us know if it deploys
|
@ykethan I created a new Role and attached the AmplifyBackendDeployFullAccess policy to it, assigned it to the app and worked properly. Specific steps i took Just to make it clear, I'm using Turborepo. But it should work almost the same for any other monorepo solution. here is my project's structure.
Specify that the app is a monorepo and that the root directory to be . (the root off the whole monorepo) 2 Edit the build yml file
Both AdministratorAccess-Amplify and AmplifyBackendDeployFullAccess are good for this purpose.
Add the custom role that we created previously and redeploy It should now be able to deploy without an issue. Thank you for providing more insight on how to fix it and why was it that it was failing @ykethan. |
@crafael23 👋 , thanks for sharing the detailed information and glad to hear that you are now unblocked. We are marking this as a bug to optionally allow creating an IAM service role by default for all apps. |
Environment information
Describe the bug
I've been trying to setup a custom repository for a monorepo that will have several apps hosted on it.
The objective is to be able to share the backend with multple web and mobile apps.
I cant seem to be able to build the backend.
I get the following error within the console when attempting to build it.
BUILD.txt
this is the current repo
https://github.com/KinuQ/kinuqmono
Im honestly not sure what is it that I'm doing wrong.
I had another single repo app with a full fledged backend, and it is able to just go ahead and get deployed without an issue.
this is my amplify.yml for the CI process
Reproduction steps
fork my repo,
attempt to deploy on aws.
The text was updated successfully, but these errors were encountered: