aws-amplify / aws-amplify/amplify-hosting

BootstrapDetectionError: Unable to detect CDK bootstrap stack due to permission issues. On backend build Unable to deploy monorepo.

Open
#4,038 15 comments 0 reactions 0 assignees View on GitHub
bug deploy
Dominant language
Dockerfile
Stars
481
Forks
123
PR merge metrics
No merged PRs in 30d

Description

### Environment information

```plain text
System:
OS: macOS 15.1
CPU: (11) arm64 Apple M3 Pro
Memory: 111.02 MB / 18.00 GB
Shell: /bin/zsh
Binaries:
Node: 22.11.0 - ~/Library/pnpm/node
Yarn: undefined - undefined
npm: 10.9.0 - ~/Library/pnpm/npm
pnpm: 9.12.3 - ~/Library/pnpm/pnpm
NPM Packages:
@aws-amplify/auth-construct: Not Found
@aws-amplify/backend: 1.7.0
@aws-amplify/backend-auth: Not Found
@aws-amplify/backend-cli: 1.4.2
@aws-amplify/backend-data: Not Found
@aws-amplify/backend-deployer: Not Found
@aws-amplify/backend-function: Not Found
@aws-amplify/backend-output-schemas: Not Found
@aws-amplify/backend-output-storage: Not Found
@aws-amplify/backend-secret: Not Found
@aws-amplify/backend-storage: Not Found
@aws-amplify/cli-core: Not Found
@aws-amplify/client-config: Not Found
@aws-amplify/deployed-backend-client: Not Found
@aws-amplify/form-generator: Not Found
@aws-amplify/model-generator: Not Found
@aws-amplify/platform-core: Not Found
@aws-amplify/plugin-types: Not Found
@aws-amplify/sandbox: Not Found
@aws-amplify/schema-generator: Not Found
aws-amplify: 6.8.0
aws-cdk: 2.166.0
aws-cdk-lib: 2.166.0
typescript: 5.5.4
AWS environment variables:
AWS_STS_REGIONAL_ENDPOINTS = regional
AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
AWS_SDK_LOAD_CONFIG = 1
No CDK environment variables
```

### 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](https://github.com/user-attachments/files/17723633/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
```
version: 1
backend:
phases:
preBuild:
commands:
- corepack enable
- pnpm install
build:
commands:
- echo $AWS_BRANCH
- echo $AWS_APP_ID
- pwd
- cd packages/amplify
- pwd
- pnpm exec ampx pipeline-deploy --branch $AWS_BRANCH --app-id $AWS_APP_ID
- cd ...

frontend:
phases:
build:
commands:
- pnpm turbo build
artifacts:
baseDirectory: apps/placeholderapp/dist
files:
- "**/*"
cache:
paths:
- node_modules/**/*
```

### Reproduction steps

fork my repo,

attempt to deploy on aws.

Contributor guide

Open the contributing guide

Research direction

Start with the linked repository's amplify.yml and the BUILD.txt attachment, then inspect the packages/amplify entry point and the `pnpm exec ampx pipeline-deploy --branch $AWS_BRANCH --app-id $AWS_APP_ID` command. Reproduce the deployment using the listed environment and permissions; done means the monorepo backend deploys without BootstrapDetectionError.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, node.js, typescript
Domain
backend, ci-cd, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.