Skip to content
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

Configure AWS #2

Merged
merged 4 commits into from
Nov 21, 2019
Merged

Configure AWS #2

merged 4 commits into from
Nov 21, 2019

Conversation

github-learning-lab[bot]
Copy link
Contributor

AWS Configuration - S3 Buckets

GitHub Actions is cloud agnostic, so any cloud will work. We'll show how to deploy to AWS in this course.

S3 Buckets

Amazon S3 Buckets are a very flexible type of data storage -- they can be configured to work in many different types of ways. They're popular for their security, scalability, and dependability. Our S3 Bucket will store our application, both in staging and in production.

Step 5: Confirm AWS S3 configuration

⌨️ Activity: Create an S3 bucket

  1. Navigate to the Amazon S3 service and click on Create bucket.
    • See Create a Bucket on AWS documentation for the most detailed instructions.
  2. Name the bucket whatever you'd like, and jot the name down.
  3. Select a region, and jot it down. You'll need it later. These examples use US West (Oregon), also known as us-west-2. If you'd like to choose another region, make sure to update the aws-config.yml file to match.
  4. For all other options, accept the defaults.
  5. Edit the .github/aws-config.yml file on this branch, or use this quick link. (We recommend opening the quick link in another tab.)
  6. Change the value of s3_bucket: to match your chosen bucket name.
  7. In the same file, confirm that the region: value matches your chosen region for the S3 bucket.
  8. Commit your changes.

I'll respond when I detect a commit on this branch.

@github-learning-lab
Copy link
Contributor Author

AWS Configuration files

To deploy successfully to our S3 bucket on AWS, we need a few special configuration files.

aws-config.yml

The aws-config.yml file is needed with the Deploy to AWS Action that we're using. How did we know that it's needed? In the documentation for the GitHub action, there are specific instructions about including this file, and where it needs to sit within the repository.

Whenever you're using a GitHub Action, it's important to read the documentation. There may be details like what secrets or other template files are required for the Action to work as expected.

sam-template.yml

This file is a bit trickier. The template aws-config.yml file that was documented with the action has a placeholder for this template, but doesn't specify what we should do.

This file is specific to deploying a serverless application to AWS. Specifically, an AWS SAM template tells AWS how to set up the application's architecture. Read more about it in AWS SAM Template Concepts in the AWS documentation.

In our case, we created the sam-template.yml for you. It contains information that's specific about the application's endpoints and structure.

Step 7: Approve the pull request

I've requested your approval on this pull request. Once you approve this, I will merge.

⌨️ Activity: Approve pull request adding aws-config.yml and sam-template.yml

  1. Approve this pull request

@github-learning-lab github-learning-lab bot merged commit 4a5750f into master Nov 21, 2019
@github-learning-lab
Copy link
Contributor Author

You can find your next steps in the next pull request.

@github-learning-lab
Copy link
Contributor Author

The deployment may take a few moments but you've done the right thing. Once the deployment is successful, you'll see green check marks for each run, and you'll see a URL for your deployment.

a screenshot of the Actions logs showing a completed deployment with an Output section and a staging URL

You can wait for the deployment, or move on to the next steps in the next pull request.

If you'd like to come back and merge this once their other workflow is done, you can. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants