-
Notifications
You must be signed in to change notification settings - Fork 25
docs: deploy to AWS Amplify #42
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Caution Review failedThe pull request is closed. WalkthroughA new document titled Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for composable-ui-storefront canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Outside diff range and nitpick comments (4)
docs/docs/build_and_deploy/deploy_aws.md (4)
15-28: Fix typos in setup instructions.There are a few typos in the setup instructions:
-- Once in the AWS Ampliy dashboard, click on `Create new app`. +- Once in the AWS Amplify dashboard, click on `Create new app`.🧰 Tools
🪛 Markdownlint
23-23: Expected: 2; Actual: 3
Unordered list indentation(MD007, ul-indent)
31-54: Add comments to YAML configuration for better maintainability.The YAML configuration is correct, but adding comments would help users understand each section better.
version: 1 applications: - frontend: phases: preBuild: commands: + # Configure pnpm for hoisted dependencies - echo 'node-linker=hoisted' >> .npmrc + # Install pnpm package manager - npm install -g pnpm + # Install project dependencies - pnpm install build: commands: + # Copy environment variables to .env file - env >> .env + # Build only the composable-ui package using Turborepo - npx turbo run build --filter=composable-ui artifacts: baseDirectory: .next files: - '**/*' cache: paths: + # Cache pnpm store for faster subsequent builds - $(pnpm store path) buildPath: composable-ui appRoot: composable-ui
78-78: Fix typo in redeployment instruction.-- Click the `Redploy this version` button. +- Click the `Redeploy this version` button.
86-91: Remove unnecessary empty lines at the end of the file.Visit the [integrations guide](../integrations/overview.md) to setup additional features like product filtering, product promotions, content orchestration, and payments. - - - - - -
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (1)
docs/static/img/custom-domains.pngis excluded by!**/*.png
📒 Files selected for processing (1)
docs/docs/build_and_deploy/deploy_aws.md(1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/docs/build_and_deploy/deploy_aws.md
[typographical] ~13-~13: Consider adding a comma after this introductory phrase.
Context: ...repository. - This is required since later on you'll be authorizing AWS Amplify acces...
(LATER_ON_COMMA)
[duplication] ~56-~56: Possible typo: you repeated a word
Context: ...Environment Variables are configured in the the Advanced Settings section. We will sk...
(ENGLISH_WORD_REPEAT_RULE)
[typographical] ~60-~60: The word “however” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...nd deploy`. The deployment will succeed, however, we now need to setup the [Environment V...
(HOWEVER_SENTENCE)
[grammar] ~60-~60: The word “setup” is a noun. The verb is spelled with a space.
Context: ...t will succeed, however, we now need to setup the [Environment Variables](#configure-...
(NOUN_VERB_CONFUSION)
[duplication] ~71-~71: Possible typo: you repeated a word
Context: ...ste in the value we copied earlier from the the Custom domains screen. - Create environ...
(ENGLISH_WORD_REPEAT_RULE)
[uncategorized] ~72-~72: Did you mean “there is”?
Context: ...environment variable NEXTAUTH_SECRET. The is value is used by NextAuth.js to encrypt...
(THE_THERE)
[style] ~72-~72: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ...e "changeme" and revisit this later on, prior to launching to production. ### Redeploy ...
(EN_WORDINESS_PREMIUM_PRIOR_TO)
🪛 Markdownlint
docs/docs/build_and_deploy/deploy_aws.md
13-13: Expected: 2; Actual: 3
Unordered list indentation
(MD007, ul-indent)
23-23: Expected: 2; Actual: 3
Unordered list indentation
(MD007, ul-indent)
9-9: null
Multiple spaces after hash on atx style heading
(MD019, no-multiple-space-atx)
11-11: null
Bare URL used
(MD034, no-bare-urls)
72-72: null
Spaces inside link text
(MD039, no-space-in-links)
🔇 Additional comments (1)
docs/docs/build_and_deploy/deploy_aws.md (1)
1-8: LGTM! Clear document structure and metadata.
| Now go to `Hosting` => `Environment variables`. We need to configure two environment variables for NextAuth.js: | ||
| - Create environment variable `NEXTAUTH_URL` and paste in the value we copied earlier from the the Custom domains screen. | ||
| - Create environment variable `NEXTAUTH_SECRET`. The is value is used by NextAuth.js to encrypt auth cookies. See the[ NextAuth.js docs](https://next-auth.js.org/configuration/options#nextauth_secret) for creating a strong secret. You can also set this to something like "changeme" and revisit this later on, prior to launching to production. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enhance security guidance for NEXTAUTH_SECRET.
The current guidance for NEXTAUTH_SECRET could be stronger from a security perspective.
-- Create environment variable `NEXTAUTH_SECRET`. The is value is used by NextAuth.js to encrypt auth cookies. See the[ NextAuth.js docs](https://next-auth.js.org/configuration/options#nextauth_secret) for creating a strong secret. You can also set this to something like "changeme" and revisit this later on, prior to launching to production.
+- Create environment variable `NEXTAUTH_SECRET`. This value is used by NextAuth.js to encrypt authentication cookies. For production environments, generate a strong secret using:
+ ```bash
+ openssl rand -base64 32
+ ```
+ See the [NextAuth.js docs](https://next-auth.js.org/configuration/options#nextauth_secret) for more details.
+
+ > **Warning**: Never use placeholder values like "changeme" in production environments as this compromises security.🧰 Tools
🪛 LanguageTool
[duplication] ~71-~71: Possible typo: you repeated a word
Context: ...ste in the value we copied earlier from the the Custom domains screen. - Create environ...
(ENGLISH_WORD_REPEAT_RULE)
[uncategorized] ~72-~72: Did you mean “there is”?
Context: ...environment variable NEXTAUTH_SECRET. The is value is used by NextAuth.js to encrypt...
(THE_THERE)
[style] ~72-~72: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ...e "changeme" and revisit this later on, prior to launching to production. ### Redeploy ...
(EN_WORDINESS_PREMIUM_PRIOR_TO)
🪛 Markdownlint
72-72: null
Spaces inside link text
(MD039, no-space-in-links)
| ## Prerequisite | ||
|
|
||
| - You'll need an AWS account, sign up here: https://aws.amazon.com/ | ||
| - You'll need to fork the Composable UI github repository. | ||
| - This is required since later on you'll be authorizing AWS Amplify access to your forked copy of Composable UI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Improve formatting and clarity in prerequisites section.
- Format the AWS URL as a proper Markdown link
- Fix list indentation
- Clarify the forking requirement
Apply these changes:
-## Prerequisite
+## Prerequisites
-- You'll need an AWS account, sign up here: https://aws.amazon.com/
-- You'll need to fork the Composable UI github repository.
- - This is required since later on you'll be authorizing AWS Amplify access to your forked copy of Composable UI.
+- You'll need an [AWS account](https://aws.amazon.com/)
+- You'll need to fork the Composable UI GitHub repository
+ - AWS Amplify requires access to your own copy of the repository, which is why forking is necessary📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ## Prerequisite | |
| - You'll need an AWS account, sign up here: https://aws.amazon.com/ | |
| - You'll need to fork the Composable UI github repository. | |
| - This is required since later on you'll be authorizing AWS Amplify access to your forked copy of Composable UI. | |
| ## Prerequisites | |
| - You'll need an [AWS account](https://aws.amazon.com/) | |
| - You'll need to fork the Composable UI GitHub repository | |
| - AWS Amplify requires access to your own copy of the repository, which is why forking is necessary |
🧰 Tools
🪛 LanguageTool
[typographical] ~13-~13: Consider adding a comma after this introductory phrase.
Context: ...repository. - This is required since later on you'll be authorizing AWS Amplify acces...
(LATER_ON_COMMA)
🪛 Markdownlint
13-13: Expected: 2; Actual: 3
Unordered list indentation
(MD007, ul-indent)
9-9: null
Multiple spaces after hash on atx style heading
(MD019, no-multiple-space-atx)
11-11: null
Bare URL used
(MD034, no-bare-urls)
| - Go to the main dashboard of your app in AWS Amplify. | ||
| - Click on `Hosting` => `Custom domains` and copy the URL to your clipboard. See the screenshot below for an example. | ||
|
|
||
|  |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Update image path to match the correct location
The image exists at docs/static/img/custom-domains.png, but the current reference uses /img/custom-domains.png. The path needs to be updated and alt text should be added for accessibility.
-
+🔗 Analysis chain
Verify image path and add alt text.
The image reference needs verification and accessibility improvements.
-
+🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check if the image exists in the repository
fd -t f "custom-domains.png" img/
Length of output: 125
Script:
#!/bin/bash
# Let's first find the correct location of the images directory
fd -t d "img"
# Also check for alternative image directories like images, assets, etc.
fd -t d "(images|assets)"
# Let's also check the entire repository for this specific image
fd "custom-domains.png"
Length of output: 195
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (4)
docs/docs/build_and_deploy/deploy_aws.md (4)
5-8: Enhance the introduction with AWS Amplify contextConsider expanding the introduction to briefly explain what AWS Amplify is and its benefits for deploying Composable UI. This helps users understand why they might choose this deployment option.
# Deploy to AWS Amplify -This guide covers how to deploy Composable UI to AWS Amplify +This guide covers how to deploy Composable UI to AWS Amplify, a fully managed platform that provides automated deployments, hosting, and continuous integration/continuous delivery (CI/CD) workflows. AWS Amplify simplifies the deployment process and offers features like automatic SSL certificates, custom domains, and easy environment variable management.
15-28: Add screenshots for key setup stepsConsider adding screenshots for critical steps like:
- AWS Amplify dashboard navigation
- Create new app button location
- GitHub provider selection
- Repository selection interface
- Monorepo configuration options
This would make it easier for users to follow along and confirm they're on the right track.
🧰 Tools
🪛 Markdownlint
23-23: Expected: 2; Actual: 3
Unordered list indentation(MD007, ul-indent)
31-55: Document key YML configuration settingsConsider adding brief explanations for important configuration settings:
- Why
node-linker=hoistedis needed- Purpose of
env >> .envcommand- Explanation of the build path and app root settings
- Cache configuration benefits
This helps users understand and potentially customize the configuration for their needs.
74-84: Add troubleshooting guidanceConsider adding a troubleshooting section that covers common deployment issues and their solutions, such as:
- Build failures and common causes
- Environment variable configuration issues
- Domain/SSL certificate problems
- Performance optimization tips
This would help users resolve common problems independently.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
docs/docs/build_and_deploy/deploy_aws.md(1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/docs/build_and_deploy/deploy_aws.md
[typographical] ~13-~13: Consider adding a comma after this introductory phrase.
Context: ...repository. - This is required since later on you'll be authorizing AWS Amplify acces...
(LATER_ON_COMMA)
[typographical] ~60-~60: The word “however” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...nd deploy`. The deployment will succeed, however, we now need to setup the [Environment V...
(HOWEVER_SENTENCE)
[grammar] ~60-~60: The word “setup” is a noun. The verb is spelled with a space.
Context: ...t will succeed, however, we now need to setup the [Environment Variables](#configure-...
(NOUN_VERB_CONFUSION)
[style] ~72-~72: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ...e "changeme" and revisit this later on, prior to launching to production. ### Redeploy ...
(EN_WORDINESS_PREMIUM_PRIOR_TO)
🪛 Markdownlint
docs/docs/build_and_deploy/deploy_aws.md
13-13: Expected: 2; Actual: 3
Unordered list indentation
(MD007, ul-indent)
23-23: Expected: 2; Actual: 3
Unordered list indentation
(MD007, ul-indent)
9-9: null
Multiple spaces after hash on atx style heading
(MD019, no-multiple-space-atx)
11-11: null
Bare URL used
(MD034, no-bare-urls)
72-72: null
Spaces inside link text
(MD039, no-space-in-links)
🔇 Additional comments (3)
docs/docs/build_and_deploy/deploy_aws.md (3)
9-13: Previous formatting and clarity suggestions still apply
The existing review comment about improving the prerequisites section formatting remains valid.
🧰 Tools
🪛 LanguageTool
[typographical] ~13-~13: Consider adding a comma after this introductory phrase.
Context: ...repository. - This is required since later on you'll be authorizing AWS Amplify acces...
(LATER_ON_COMMA)
🪛 Markdownlint
13-13: Expected: 2; Actual: 3
Unordered list indentation
(MD007, ul-indent)
9-9: null
Multiple spaces after hash on atx style heading
(MD019, no-multiple-space-atx)
11-11: null
Bare URL used
(MD034, no-bare-urls)
68-68: Previous image path correction still needed
The existing review comment about updating the image path and adding alt text remains valid.
72-72: Previous security guidance enhancement still applies
The existing review comment about enhancing the NEXTAUTH_SECRET security guidance remains valid.
🧰 Tools
🪛 LanguageTool
[style] ~72-~72: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ...e "changeme" and revisit this later on, prior to launching to production. ### Redeploy ...
(EN_WORDINESS_PREMIUM_PRIOR_TO)
🪛 Markdownlint
72-72: null
Spaces inside link text
(MD039, no-space-in-links)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Outside diff range and nitpick comments (5)
amplify.yml (2)
7-9: Consider version-locking pnpm installation.For build reproducibility, consider specifying a fixed version of pnpm.
- npm install -g pnpm + npm install -g pnpm@8.x # Replace with your desired version
14-20: Consider optimizing artifact and cache configuration.While the current configuration works, consider:
- Being more specific about which files to include in artifacts
- Adding additional cache paths for faster builds
artifacts: baseDirectory: .next files: - - '**/*' + - '**/*.js' + - '**/*.css' + - '**/*.html' + - '**/*.json' cache: paths: - $(pnpm store path) + - node_modules/**/* + - .next/cache/**/*docs/docs/build_and_deploy/deploy_aws.md (3)
5-8: Enhance the introduction with AWS Amplify contextConsider expanding the introduction to briefly explain what AWS Amplify is and its benefits for deploying Composable UI. This helps users understand why they might choose this deployment option.
# Deploy to AWS Amplify -This guide covers how to deploy Composable UI to AWS Amplify +This guide covers how to deploy Composable UI to AWS Amplify, a fully managed service that provides a git-based workflow for hosting full-stack serverless web applications. AWS Amplify offers features like continuous deployment, easy scaling, and built-in monitoring that make it an excellent choice for deploying Composable UI.
31-55: Document YML configuration sectionsThe YML configuration would benefit from inline comments explaining each section's purpose and customization options.
```yml version: 1 applications: - frontend: phases: + # Install dependencies and configure package manager preBuild: commands: - echo 'node-linker=hoisted' >> .npmrc - npm install -g pnpm - pnpm install + # Build the application using Turborepo build: commands: - env >> .env - npx turbo run build --filter=composable-ui + # Specify the build output to be deployed artifacts: baseDirectory: .next files: - '**/*' + # Configure build caching for faster deployments cache: paths: - $(pnpm store path) + # Specify the application paths buildPath: composable-ui appRoot: composable-ui
86-89: Expand references sectionInclude additional relevant AWS Amplify documentation links.
## References - [AWS Amplify - Configuring monorepo build settings](https://docs.aws.amazon.com/amplify/latest/userguide/monorepo-configuration.html) +- [AWS Amplify - Environment Variables](https://docs.aws.amazon.com/amplify/latest/userguide/environment-variables.html) +- [AWS Amplify - Custom Domains](https://docs.aws.amazon.com/amplify/latest/userguide/custom-domains.html) +- [AWS Amplify - Build Settings](https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html) +- [AWS Amplify - Troubleshooting](https://docs.aws.amazon.com/amplify/latest/userguide/troubleshooting.html)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
amplify.yml(1 hunks)docs/docs/build_and_deploy/deploy_aws.md(1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/docs/build_and_deploy/deploy_aws.md
[typographical] ~13-~13: Consider adding a comma after this introductory phrase.
Context: ...repository. - This is required since later on you'll be authorizing AWS Amplify acces...
(LATER_ON_COMMA)
[typographical] ~60-~60: The word “however” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...nd deploy`. The deployment will succeed, however, we now need to setup the [Environment V...
(HOWEVER_SENTENCE)
[grammar] ~60-~60: The word “setup” is a noun. The verb is spelled with a space.
Context: ...t will succeed, however, we now need to setup the [Environment Variables](#configure-...
(NOUN_VERB_CONFUSION)
[style] ~72-~72: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ...e "changeme" and revisit this later on, prior to launching to production. ### Redeploy ...
(EN_WORDINESS_PREMIUM_PRIOR_TO)
🪛 Markdownlint
docs/docs/build_and_deploy/deploy_aws.md
13-13: Expected: 2; Actual: 3
Unordered list indentation
(MD007, ul-indent)
23-23: Expected: 2; Actual: 3
Unordered list indentation
(MD007, ul-indent)
9-9: null
Multiple spaces after hash on atx style heading
(MD019, no-multiple-space-atx)
11-11: null
Bare URL used
(MD034, no-bare-urls)
72-72: null
Spaces inside link text
(MD039, no-space-in-links)
🔇 Additional comments (2)
amplify.yml (2)
1-3: LGTM: Version and application structure are correctly defined.
21-22: Verify monorepo directory structure.
The configuration assumes composable-ui is the frontend application directory. Let's verify this structure.
✅ Verification successful
Build path and app root configuration is correct
The verification confirms that composable-ui is indeed the frontend application directory with all essential Next.js files present:
- package.json
- next.config.js
- tsconfig.json
- src directory with application code
- public directory for static assets
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Verify the existence and structure of the composable-ui directory
if [ -d "composable-ui" ]; then
echo "Directory structure:"
ls -la composable-ui
# Check for essential files
echo -e "\nChecking for essential files:"
for file in package.json next.config.js tsconfig.json; do
if [ -f "composable-ui/$file" ]; then
echo "✓ $file exists"
else
echo "✗ $file missing"
fi
done
else
echo "Error: composable-ui directory not found"
exit 1
fi
Length of output: 1833
| - env >> .env | ||
| - npx turbo run build --filter=composable-ui |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security concern: Environment variable handling.
The env >> .env command dumps all environment variables to a file, which could potentially expose sensitive information in build logs. Consider:
- Only copying specific required variables
- Adding cleanup of the .env file after build
- Validating required environment variables before build
- env >> .env
+ # Only copy required variables
+ echo "NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL" >> .env
+ echo "NEXTAUTH_URL=$NEXTAUTH_URL" >> .env
+ # Add validation
+ if [ -z "$NEXTAUTH_URL" ]; then
+ echo "Error: NEXTAUTH_URL is required"
+ exit 1
+ fi
npx turbo run build --filter=composable-ui
+ # Cleanup
+ rm -f .env📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - env >> .env | |
| - npx turbo run build --filter=composable-ui | |
| # Only copy required variables | |
| echo "NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL" >> .env | |
| echo "NEXTAUTH_URL=$NEXTAUTH_URL" >> .env | |
| # Add validation | |
| if [ -z "$NEXTAUTH_URL" ]; then | |
| echo "Error: NEXTAUTH_URL is required" | |
| exit 1 | |
| fi | |
| npx turbo run build --filter=composable-ui | |
| # Cleanup | |
| rm -f .env |
| After setting the `NEXTAUTH_URL` and `NEXTAUTH_SECRET` environment variables, the app is now ready to be redeployed: | ||
| - Go to the dashboard of your app, and click on the `main` deployment. | ||
| - Click the `Redeploy this version` button. | ||
|
|
||
| When the app finishes deployment, your Composable UI storefront is ready to use! Go back to the dashboard of your app, and click `Visit Deployed URL`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add deployment verification steps
Include steps to verify the deployment was successful beyond just visiting the URL.
After setting the `NEXTAUTH_URL` and `NEXTAUTH_SECRET` environment variables, the app is now ready to be redeployed:
- Go to the dashboard of your app, and click on the `main` deployment.
- Click the `Redeploy this version` button.
-When the app finishes deployment, your Composable UI storefront is ready to use! Go back to the dashboard of your app, and click `Visit Deployed URL`.
+When the app finishes deployment:
+1. Check the build logs for any warnings or errors
+2. Verify the deployment status shows as "Success"
+3. Visit the deployed URL and confirm:
+ - The homepage loads correctly
+ - Navigation works as expected
+ - No console errors are present
+4. If using custom domains, verify HTTPS is properly configured📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| After setting the `NEXTAUTH_URL` and `NEXTAUTH_SECRET` environment variables, the app is now ready to be redeployed: | |
| - Go to the dashboard of your app, and click on the `main` deployment. | |
| - Click the `Redeploy this version` button. | |
| When the app finishes deployment, your Composable UI storefront is ready to use! Go back to the dashboard of your app, and click `Visit Deployed URL`. | |
| After setting the `NEXTAUTH_URL` and `NEXTAUTH_SECRET` environment variables, the app is now ready to be redeployed: | |
| - Go to the dashboard of your app, and click on the `main` deployment. | |
| - Click the `Redeploy this version` button. | |
| When the app finishes deployment: | |
| 1. Check the build logs for any warnings or errors | |
| 2. Verify the deployment status shows as "Success" | |
| 3. Visit the deployed URL and confirm: | |
| - The homepage loads correctly | |
| - Navigation works as expected | |
| - No console errors are present | |
| 4. If using custom domains, verify HTTPS is properly configured |
| ### Configure the new app | ||
| - Select `GitHub` as the Git provider, and click `Next`. | ||
| - Select your Composable UI repository from the `Select a repository` search bar. | ||
| - Note: You may need to click on the `Update GitHub permissions` button to authorize AWS access to your desired github organization and specific github repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Enhance GitHub permissions guidance
The note about GitHub permissions should include more specific details about the required permissions scope and security implications.
- - Note: You may need to click on the `Update GitHub permissions` button to authorize AWS access to your desired github organization and specific github repository.
+ - Note: You may need to click on the `Update GitHub permissions` button to authorize AWS access. When prompted:
+ - For personal repositories: Grant access only to the specific repository you're deploying
+ - For organization repositories: Request minimal necessary permissions from your organization admin
+ - Review the requested permissions carefully before accepting📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - Note: You may need to click on the `Update GitHub permissions` button to authorize AWS access to your desired github organization and specific github repository. | |
| - Note: You may need to click on the `Update GitHub permissions` button to authorize AWS access. When prompted: | |
| - For personal repositories: Grant access only to the specific repository you're deploying | |
| - For organization repositories: Request minimal necessary permissions from your organization admin | |
| - Review the requested permissions carefully before accepting |
🧰 Tools
🪛 Markdownlint
23-23: Expected: 2; Actual: 3
Unordered list indentation
(MD007, ul-indent)
| Now go to `Hosting` => `Environment variables`. We need to configure two environment variables for NextAuth.js: | ||
| - Create environment variable `NEXTAUTH_URL` and paste in the value we copied earlier from the Custom domains screen. | ||
| - Create environment variable `NEXTAUTH_SECRET`. This value is used by NextAuth.js to encrypt auth cookies. See the[ NextAuth.js docs](https://next-auth.js.org/configuration/options#nextauth_secret) for creating a strong secret. You can also set this to something like "changeme" and revisit this later on, prior to launching to production. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Document environment variable persistence
Add information about environment variable persistence across deployments and branches.
Now go to `Hosting` => `Environment variables`. We need to configure two environment variables for NextAuth.js:
- Create environment variable `NEXTAUTH_URL` and paste in the value we copied earlier from the Custom domains screen.
- Create environment variable `NEXTAUTH_SECRET`. This value is used by NextAuth.js to encrypt auth cookies. See the[ NextAuth.js docs](https://next-auth.js.org/configuration/options#nextauth_secret) for creating a strong secret. You can also set this to something like "changeme" and revisit this later on, prior to launching to production.
+
+Note: Environment variables in AWS Amplify:
+- Persist across deployments
+- Can be configured per branch
+- Can be marked as sensitive to mask their values in logs
+- Should be backed up securely outside of AWS Amplify📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Now go to `Hosting` => `Environment variables`. We need to configure two environment variables for NextAuth.js: | |
| - Create environment variable `NEXTAUTH_URL` and paste in the value we copied earlier from the Custom domains screen. | |
| - Create environment variable `NEXTAUTH_SECRET`. This value is used by NextAuth.js to encrypt auth cookies. See the[ NextAuth.js docs](https://next-auth.js.org/configuration/options#nextauth_secret) for creating a strong secret. You can also set this to something like "changeme" and revisit this later on, prior to launching to production. | |
| Now go to `Hosting` => `Environment variables`. We need to configure two environment variables for NextAuth.js: | |
| - Create environment variable `NEXTAUTH_URL` and paste in the value we copied earlier from the Custom domains screen. | |
| - Create environment variable `NEXTAUTH_SECRET`. This value is used by NextAuth.js to encrypt auth cookies. See the[ NextAuth.js docs](https://next-auth.js.org/configuration/options#nextauth_secret) for creating a strong secret. You can also set this to something like "changeme" and revisit this later on, prior to launching to production. | |
| Note: Environment variables in AWS Amplify: | |
| - Persist across deployments | |
| - Can be configured per branch | |
| - Can be marked as sensitive to mask their values in logs | |
| - Should be backed up securely outside of AWS Amplify |
🧰 Tools
🪛 LanguageTool
[style] ~72-~72: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ...e "changeme" and revisit this later on, prior to launching to production. ### Redeploy ...
(EN_WORDINESS_PREMIUM_PRIOR_TO)
🪛 Markdownlint
72-72: null
Spaces inside link text
(MD039, no-space-in-links)
Provide instructions on deploying Composable UI to AWS Amplify
Summary by CodeRabbit