Skip to content

Latest commit

 

History

History
238 lines (161 loc) · 7.96 KB

File metadata and controls

238 lines (161 loc) · 7.96 KB

Week 0 — Billing and Architecture

Homework Submissions

  • Watch Week-0 Video

Live Stream Week-0

Week 0 - Generate Credentials, AWS CLI, Budget and Billing Alarm via CLI

AWS Bootcamp Week 0 - Pricing Basics and Free tier

AWS Organizations & AWS IAM Tutorial For Beginners - Cloud BootCamp - Week 0

AWS Cloud Project Bootcamp YouTube Playlist

  • Read all the necessary information

AWS Cloud Project Bootcamp Outline

AWS Cloud Project Bootcamp FAQs

AWS Cloud Project Bootcamp Surveys

AWS Cloud Project Bootcamp Codes of Conduct

AWS Cloud Project Bootcamp Sponsorship Package

  • Creat All needed for project account

    • AWS
    • Lucidcharts
    • Github/Codespace
    • Gitpod
    • Momento
    • AWS Route 53 (delyourhistory.link)
    • HoneyComb
    • Rollbar
  • Clone main branch for cruddur app

aws-bootcamp-cruddur-2023

  • Create week-0 branch for Homework submissions
  • Install AWS CLI for SDE
  • Create AWS Credentials
  • Secure Account with MFA and AWS Organizations

AWS Organizations Unit Best Practice

  • Create Custom AWS OU SCP Best Practice Policy

https://github.com/hashishrajan/aws-scp-best-practice-policies

  • Enable Billing and Billing alarm for AWS Account
  • Create Napkin Diagramm
  • Create Conceptual Diagramm
  • Create Logical Diagramm
  • Create AWS Budget
  • Activate AWS CloudTrail Services (free tier for 90 days)

Homework Tasks

Create Napkin Diagramm for our Application

My Example

Napkin Diagramm

Create Conceptual Diagramm

My Conceptual Diagramm Conceptual Diagramm

Conceptual Diagramm

Create AWS Logical Architecture Design

My example for this project Lucid Charts Share Link

sm1lexops Lucid Chart Share Link

Create AWS Account

To create a new AWS account, go to aws.amazon.com and choose Create an AWS Account.

Secure your AWS Account

  • Secure and add MFA for root user What is MFA
  • Create additional user at the IAM Dashboard (Optinal: you can creat user with AWS portall or AD login with granular access policy)
  • Set account alias and region

Install AWS CLI

Install AWS CLI for our SDE Gitpod

gp init # for initialize our .gitpod.yml conf file

Add next instructions to .gitpod.yml file

tasks:
  - name: aws-cli
    env:
      AWS_CLI_AUTO_PROMPT: on-partial
    init: |
      cd /workspace
      curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
      unzip awscliv2.zip
      sudo ./aws/install
      cd $THEIA_WORKSPACE_ROOT

Set Env Vars

You can get these ENV Variable via command line or programmatic access link

env_aws

We will set these credentials for the current bash terminal

export AWS_ACCESS_KEY_ID=""
export AWS_SECRET_ACCESS_KEY=""
export AWS_DEFAULT_REGION=us-east-1

We'll tell Gitpod to remember these credentials if we relaunch our workspaces

gp env AWS_ACCESS_KEY_ID=""
gp env AWS_SECRET_ACCESS_KEY=""
gp env AWS_DEFAULT_REGION=us-east-1

Check that the AWS CLI is working and you are the expected user

aws sts get-caller-identity

You should see something like this:

{
    "UserId": "AIFBZRJIQN2ONP4ET4EK4",
    "Account": "655602346534",
    "Arn": "arn:aws:iam::655602346534:user/andrewcloudcamp"
}

In my case lools like this:

AWS Credentials

Enable Billing

We need to turn on Billing Alerts to recieve alerts...

  • In your Root Account

Root Account

  • go to the Billing Page
  • Under Billing Preferences Choose Receive Billing Alerts
  • Save Preferences

Enable billing AWS

Creating a Billing Alarm

Create SNS Topic

  • We need an SNS topic before we create an alarm.
  • The SNS topic is what will delivery us an alert when we get overbilled
  • aws sns create-topic

We'll create a SNS Topic

aws sns create-topic --name billing-alarm

which will return a TopicARN

We'll create a subscription supply the TopicARN and our Email

aws sns subscribe \
    --topic-arn TopicARN \
    --protocol email \
    --notification-endpoint your@email.com

Check your email and confirm the subscription

Billing Subscription

Create Alarm

aws cloudwatch put-metric-alarm --cli-input-json file://aws/json/alarm_config.json

Create an AWS Budget

aws budgets create-budget

Get your AWS Account ID

aws sts get-caller-identity --query Account --output text
  • Supply your AWS Account ID
  • Update the json files
  • This is another case with AWS CLI its just much easier to json files due to lots of nested json
aws budgets create-budget \
    --account-id AccountID \
    --budget file://aws/json/budget.json \
    --notifications-with-subscribers file://aws/json/budget-notifications-with-subscribers.json

Create Custom AWS OU SCP Best Practice Policy

  • AWS OU Configuration

AWS OU

  • AWS SCP Recommendation

AWS SCP

Activate AWS CloudTrail Services (free tier for 90 days)

  • AWS CloudTrail

AWS CloudTrail