Using the Hosting feature, you can deploy your application to AWS as
well as set up your site with Amazon Cloudfront CDN. This is what we’ll
be doing in this tutorial. Let’s begin!

Getting Started - Gatsby

First, we’ll want to create a new Gatsby project. If you don’t already
have Gatsby installed, install it:

npm install - global gatsby-cli

Next, we’ll create a new Gatsby site:

gatsby new my-gatsby-site

Finally, change into the new site directory:

cd my-gatsby-site

Getting Started - AWS Amplify

Now that we have our Gatsby site up & running, let’s add hosting & make
the site live on AWS.

First, we’ll install the AWS Amplify CLI:

npm i -g @aws-amplify/cli

With the AWS Amplify CLI installed, we now need to configure it with an
IAM User:

amplify configure

For a video walkthrough of how to configure the AWS Amplify CLI, click here.

Now, we can create a new Amplify project in the root of our Gatsby project:

amplify init

Choose your default editor: (for me, this is Visual Studio Code)

Please choose the type of app that you’re building: javascript

What JavaScript framework are you using: react

Source Directory Path: src

Distribution Directory Path: public

Build Command: npm run-script build

Start Command: npm run-script develop

Do you want to use an AWS profile? Y

Please choose the profile you want to use: default

Now, the Amplify project has been created. You will see that you have a new amplify folder in your project directory as well as an .amplifyrc file. Both of these contain your AWS Amplify project configuration.

Next, we can type amplify into our command line & see all of the options that we have:

amplify

At the bottom, we can see the available categories available to us. Hosting is the category we would like to enable, so let’s do so now:

Issue gatsbyjs#8103: This is for the second task, "using gatsby-image to prevent image bloat". I did my best to make sure the links from the original article were still present.
Not sure how to navigate the fact that in the original article, it's specifically Kyle talking, so right now everything's still in first-person. I also cut the last line, which was leading to the next section of the article so wouldn't be relevant here (unless I should have included that next section as well?).
Let me know if there's anything you'd like me to change - this is my first-ever contribution to an open source project (currently in a web dev bootcamp), so I'm sorry if I screwed anything up!

Verified

This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.

* Create using-gatsby-image.md
Issue #8103: This is for the second task, "using gatsby-image to prevent image bloat". I did my best to make sure the links from the original article were still present.
Not sure how to navigate the fact that in the original article, it's specifically Kyle talking, so right now everything's still in first-person. I also cut the last line, which was leading to the next section of the article so wouldn't be relevant here (unless I should have included that next section as well?).
Let me know if there's anything you'd like me to change - this is my first-ever contribution to an open source project (currently in a web dev bootcamp), so I'm sorry if I screwed anything up!
* Update using-gatsby-image.md
Updated with suggested changes!
* just added one more link
* fixes

Issue gatsbyjs#8103: this is for the "Deploy using Netlify". I tried to write a short beginner-friendly easy to follow guide for using Gatsby with Netlify.
The "Getting Started - Netlify" is copy-and-pasted of the "Deploy to S3" site,
the introduction from the original "Deploy and Build" page.

Verified

This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.

Issue #8103: this is for the "Deploy using Netlify". I tried to write a short beginner-friendly easy to follow guide for using Gatsby with Netlify.
The "Getting Started - Netlify" is copy-and-pasted of the "Deploy to S3" site,
the introduction from the original "Deploy and Build" page.
I don't see any need for an additional "Hosting on Netlify" article.
<!--
Q. Which branch should I use for my pull request?
A. Use `master` branch (probably).
Q. Which branch if my change is a bug fix for Gatsby v1?
A. In this case, you should use the `v1` branch
Q. Which branch if I'm still not sure?
A. Use `master` branch. Ask in the PR if you're not sure and a Gatsby maintainer will be happy to help :)
Note: We will only accept bug fixes for Gatsby v1. New features should be added to Gatsby v2.
Learn more about contributing: https://www.gatsbyjs.org/docs/how-to-contribute/
-->

Issue gatsbyjs#8103: this is for the "Deploy using Netlify". I tried to write a short beginner-friendly easy to follow guide for using Gatsby with Netlify.
The "Getting Started - Netlify" is copy-and-pasted of the "Deploy to S3" site,
the introduction from the original "Deploy and Build" page.
I don't see any need for an additional "Hosting on Netlify" article.
<!--
Q. Which branch should I use for my pull request?
A. Use `master` branch (probably).
Q. Which branch if my change is a bug fix for Gatsby v1?
A. In this case, you should use the `v1` branch
Q. Which branch if I'm still not sure?
A. Use `master` branch. Ask in the PR if you're not sure and a Gatsby maintainer will be happy to help :)
Note: We will only accept bug fixes for Gatsby v1. New features should be added to Gatsby v2.
Learn more about contributing: https://www.gatsbyjs.org/docs/how-to-contribute/
-->

This comment has been minimized.

great @jkjustjoshing that'd be great! Want to mention this issue in your PR for easy tracking?

Also @dougajmcdonald would you be interested in writing a blogpost on that? We trying to keep the number of deployment docs to just a select few, and then blog about other deployment strategies (and link to those blogposts from the deployment overview doc (/docs/deploying-and-hosting/)

This comment has been minimized.

@CanRau good thought. I think not here, because this issue is for content migration (@shannonbux has identified source material that could be helpful/repurposed into documentation). #4150 is possible/probable future content, but not something we have existing content to migrate.

This is a proposal to delete this doc now that we have broken all the deployment options into separate docs and I just added them to the sidebar. If this PR gets merged I'll also delete this doc from the sidebar.
Taken from #8103:
### Deploying
- [x] Deploying to S3/Cloudfront
- [x] Deploying to Netlify
- [x] Deploying to Aerobatic #8736
- [x] Deploying to Heroku #8721 (PR)
- [x] Deploying to Now #8737
- [x] Deploying to GitLab Pages #8738

Verified

This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.

This is a proposal to delete this doc now that we have broken all the deployment options into separate docs and I just added them to the sidebar (commit 1af244b). If this PR gets merged I'll also delete this doc from the sidebar.
Taken from #8103:
### Deploying
- [x] Deploying to S3/Cloudfront
- [x] Deploying to Netlify
- [x] Deploying to Aerobatic #8736
- [x] Deploying to Heroku #8721 (PR)
- [x] Deploying to Now #8737
- [x] Deploying to GitLab Pages #8738
<!--
Q. Which branch should I use for my pull request?
A. Use `master` branch (probably).
Q. Which branch if my change is a bug fix for Gatsby v1?
A. In this case, you should use the `v1` branch
Q. Which branch if I'm still not sure?
A. Use `master` branch. Ask in the PR if you're not sure and a Gatsby maintainer will be happy to help :)
Note: We will only accept bug fixes for Gatsby v1. New features should be added to Gatsby v2.
Learn more about contributing: https://www.gatsbyjs.org/docs/how-to-contribute/
-->

Verified

This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.

This is a proposal to delete this doc now that we have broken all the deployment options into separate docs and I just added them to the sidebar (commit gatsbyjs@1af244b). If this PR gets merged I'll also delete this doc from the sidebar.
Taken from gatsbyjs#8103:
### Deploying
- [x] Deploying to S3/Cloudfront
- [x] Deploying to Netlify
- [x] Deploying to Aerobatic gatsbyjs#8736
- [x] Deploying to Heroku gatsbyjs#8721 (PR)
- [x] Deploying to Now gatsbyjs#8737
- [x] Deploying to GitLab Pages gatsbyjs#8738
<!--
Q. Which branch should I use for my pull request?
A. Use `master` branch (probably).
Q. Which branch if my change is a bug fix for Gatsby v1?
A. In this case, you should use the `v1` branch
Q. Which branch if I'm still not sure?
A. Use `master` branch. Ask in the PR if you're not sure and a Gatsby maintainer will be happy to help :)
Note: We will only accept bug fixes for Gatsby v1. New features should be added to Gatsby v2.
Learn more about contributing: https://www.gatsbyjs.org/docs/how-to-contribute/
-->