-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3cc6e83
commit ac8b7b5
Showing
1 changed file
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Requirements | ||
|
||
Here are the requirements to get started and some tips on where to find assistance: | ||
|
||
* AWS account | ||
* [Setup instructions](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/) | ||
* An IAM user with console and programmatic access | ||
* Administrator privileges for your IAM user | ||
* Personal computer/laptop | ||
* Software | ||
* Web browser (e.g., Microsoft Edge, Google Chrome, or Mozilla Firefox) | ||
* Terminal with bash or Z shell (Zsh) | ||
* Git | ||
* [Install instructions](https://github.com/git-guides/install-git) | ||
* Homebrew (optional but recommended to install other requirements) | ||
* [Install instructions](https://docs.brew.sh/Installation) | ||
* Code editor (e.g., VSCodium or AWS Cloud9) | ||
* Recommended install: `brew install --cask vscodium` | ||
* AWS CLI version 2 (2.1.26 or later) | ||
* [Install guide](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) | ||
* Recommended install: brew install awscli@2 | ||
* Python 3.7.9 (and pip) or later | ||
* Example install: `brew install python@3.7` | ||
* AWS Cloud Development Kit version 2.0 or later | ||
* [Getting started guide](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html) | ||
* Recommended install: `brew install npm and npm i -g aws-cdk@next` | ||
|
||
Recommended: Create a folder in your home directory called AWSCookbook. This will allow you to clone each chapter’s repository in one place: | ||
` | ||
AWSCookbook:$ tree -L 1 | ||
. | ||
├── AccountManagement | ||
├── ArtificialIntelligence | ||
├── BigData | ||
` | ||
|
||
> NOTE: At the time of publishing, the AWS CDK has two versions: version 1 and version 2 (developer preview). The code we have provided is written for version 2. You can find out more information about how to migrate to and install CDK version 2 in this AWS CDK v2 article. | ||
Getting Started | ||
This section provides examples of techniques and approaches we perform throughout the book to make the recipe steps easier to follow. You can skip over these topics if you feel comfortable with them. You can always come back and reference this section. | ||
|
||
# Setups | ||
In addition to the installation of the prerequisites listed previously, you will need the following access. | ||
|
||
AWS account setup | ||
You will need a user with administrative permissions. Some of the recipes require the ability to create AWS Identity and Access Management (IAM) resources. You can follow the AWS guide for creating your first IAM admin user and user group. | ||
|
||
General workstation setup steps for CLI recipes | ||
We have created a group of code repositories available at https://github.com/awscookbook. Create a folder called AWSCookbook in your home directory (or any place of your choosing) and cd there: | ||
``` | ||
mkdir ~/AWSCookbook && cd ~/AWSCookbook | ||
``` | ||
This will give you a place to check out chapter repositories (e.g., Security): | ||
``` | ||
git clone https://github.com/AWSCookbook/Security | ||
``` | ||
Set and export your default Region in your terminal: | ||
``` | ||
export AWS_REGION=us-east-1 | ||
``` | ||
|
||
> TIP: AWS offers many Regions across the world for cloud deployments. We’ll be using the us-east-1 Region for simplicity. As long as the services are available, there is no reason these recipes won’t work in other Regions. AWS has a list of Regions and services. | ||
Set your AWS ACCOUNT_ID by parsing output from the `aws sts get-caller-identity` operation: | ||
``` | ||
AWS_ACCOUNT_ID=$(aws sts get-caller-identity \ | ||
--query Account --output text) | ||
``` | ||
|
||
> NOTE: The `aws sts get-caller-identity` operation “returns details about the IAM user or role whose credentials are used to call the operation.” | ||
Validate AWS Command Line Interface (AWS CLI) setup and access: | ||
``` | ||
aws ec2 describe-instances | ||
``` | ||
|
||
If you don’t have any EC2 instances deployed, you should see output similar to the following: | ||
` | ||
{ | ||
"Reservations": [] | ||
} | ||
` | ||
> NOTE: AWS CLI version 2 will by default send command output with multiple lines to less in your terminal. You can type q to exit. If you want to override this behavior, you can modify your ~/.aws/config file to remove this default functionality. | ||
> TIP: AWS CloudShell is a browser-based terminal that you can use to quickly create a terminal environment in your authenticated AWS Console session to run AWS CLI commands from. By default, it uses the identity of your browser session to interact with the AWS APIs. Many of the recipes can be run using CloudShell. You can use CloudShell to run recipe steps, clean up commands, and other AWS CLI commands as your authenticated user, if you do not want to create a session that you use in your own local terminal environment on your workstation. |