Skip to content

Commit

Permalink
update(FAQ): Access denied for certain routes even with SPA redirect (#…
Browse files Browse the repository at this point in the history
…1740)

* update(FAQ): Access denied for certain routes even with SPA redirect rule

* chore(pr template): add to update contribution license
  • Loading branch information
siegerts committed Apr 13, 2021
1 parent 68214b0 commit 5682266
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 4 deletions.
23 changes: 23 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,23 @@
<!--
Please make sure to read the Pull Request Guidelines:
https://github.com/aws-amplify/amplify-console/blob/master/CONTRIBUTING.md#pull-requests
-->

#### Description of changes

<!--
Thank you for your Pull Request! Please provide a description above and review
the requirements below.
-->

#### Issue #, if available

<!-- Also, please reference any associated PRs for documentation updates. -->

#### Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [ ] PR description included

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
23 changes: 19 additions & 4 deletions FAQ.md
Expand Up @@ -12,14 +12,15 @@
- [Table of contents](#table-of-contents)
- [Build fails with cannot find module aws-exports](#build-fails-with-cannot-find-module-aws-exports)
- [How do I override a build timeout](#how-do-i-override-a-build-timeout)
- [How do I pull private packages during a build.](#how-do-i-pull-private-packages-during-a-build)
- [How do I pull private packages during a build](#how-do-i-pull-private-packages-during-a-build)
- [How do I run Amplify functions with Python runtime](#how-do-i-run-amplify-functions-with-python-runtime)
- [How do I reduce the node_modules cache size](#how-do-i-reduce-the-node_modules-cache-size)
- Redirects
- [Access denied for certain routes even with SPA redirect rule](#access-denied-for-certain-routes-even-with-SPA-redirect-rule)
- Custom Domains
- [How do I migrate domains to Amplify with minimal downtime](#how-do-i-migrate-domains-to-amplify-with-minimal-downtime)
- [CNAMEAlreadyExistsException](#cnamealreadyexistsexception)


#### Build fails with _Cannot find module aws-exports_

The following error is generated when your app cannot find the `aws-exports.js` file.
Expand Down Expand Up @@ -84,7 +85,6 @@ backend:
- amplifyPush --simple
```
#### How do I reduce the `node_modules` cache size?
If you are caching your `node_modules` directory, you may be inadvertently caching webpack, terser and babel files which aren't cleaned up and bloat your cache. It can also cause your build to run out of memory in the caching step. To fix, omit your `.cache` directory using the `!` directive, i.e.:
Expand All @@ -96,6 +96,20 @@ cache:
- "!node_modules/.cache"
```
### Redirects
#### Access denied for certain routes even with SPA redirect rule
This can also happen if your `baseDirectory` is not set correctly. For example, if your frontend is built to the `build` directory then your build settings will need to point to that or you will see this error.
For more information: https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html#yml-specification-syntax
```yaml
baseDirectory: build
files:
- "**/*"
```
### Custom Domains
#### How do I migrate domains to Amplify with minimal downtime?
Expand Down Expand Up @@ -125,6 +139,7 @@ You will need to do the following in quick succession:
- Doing it following this method you should see very little downtime, and will mainly depend on the TTL of the DNS record.
#### CNAMEAlreadyExistsException
What this means: One of the hostnames you tried to connect (could be a subdomain, or the apex) is already deployed to a Cloudfront distribution.
https://docs.aws.amazon.com/amplify/latest/userguide/custom-domains.html#cnamealreadyexistsexception-error
Expand All @@ -143,4 +158,4 @@ Initial troubleshooting steps:
- You can use other hostnames, like blog.domain.com
- If you had this domain successfully connected to Amplify and then recently (within the last hour) deleted it, please wait and try again.
- Check the Cloudfront console to see if you have this domain deployed to any distributions
If you are positive no CloudFront distribution exists (including in other accounts) using this domain, and only if it would not be disruptive to any currently running services, try deleting and recreating the hosted zone
If you are positive no CloudFront distribution exists (including in other accounts) using this domain, and only if it would not be disruptive to any currently running services, try deleting and recreating the hosted zone

0 comments on commit 5682266

Please sign in to comment.