sam - lifeisegg2k/Study GitHub Wiki

# Homebrew version check
➜  ~ brew -v
Homebrew 2.2.6
Homebrew/homebrew-core (git revision ae7c1; last commit 2020-02-22)
Homebrew/homebrew-cask (git revision 2eac7b; last commit 2020-02-23)

# nodebrew version check
➜  ~ nodebrew -v
nodebrew 1.0.1

# installed node versions
➜  ~ nodebrew ls
v8.2.1
v11.15.0

current: v11.15.0

# Installable node version
➜  ~ nodebrew ls-remote
v0.0.1    v0.0.2    v0.0.3    v0.0.4    v0.0.5    v0.0.6
...
v12.12.0  v12.13.0  v12.13.1  v12.14.0  v12.14.1  v12.15.0  v12.16.0  v12.16.1

v13.0.0   v13.0.1   v13.1.0   v13.2.0   v13.3.0   v13.4.0   v13.5.0   v13.6.0
v13.7.0   v13.8.0   v13.9.0   v13.10.0  v13.10.1  v13.11.0
...
[email protected] [email protected] [email protected] [email protected] [email protected]

# Install node stable version
➜  ~ nodebrew install-binary stable
Fetching: https://nodejs.org/dist/v12.16.1/node-v12.16.1-darwin-x64.tar.gz
################################################################################################################# 100.0%
Installed successfully

# installed node versions
➜  ~ nodebrew ls
v8.2.1
v11.15.0
v12.16.1

current: v11.15.0

# Set node version to use
➜  ~ nodebrew use v12.16.1
use v12.16.1

# installed node versions
➜  ~ nodebrew ls
v8.2.1
v11.15.0
v12.16.1

current: v12.16.1

# npm version check
➜  ~ npm -v
6.13.4

# node.js version check
➜  ~ node -v
v12.16.1

# Install yarn
➜  ~ brew install yarn

# Upgrade yarn
➜  ~ brew upgrade yarn

➜  ~ cd work
➜  work ls
bookmark               node                   r_study                sass.sublime-project   tmp
docker                 ora2sql                ruby                   sass.sublime-workspace
lifeisegg2k            python                 sass-guidelines        serverless
➜  work mkdir sam
➜  work cd sam
➜  sam ls

➜  sam brew tap aws/tap

➜  sam sam init

	SAM CLI now collects telemetry to better understand customer needs.

	You can OPT OUT and disable telemetry collection by setting the
	environment variable SAM_CLI_TELEMETRY=0 in your shell.
	Thanks for your help!

	Learn More: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-telemetry.html

Which template source would you like to use?
	1 - AWS Quick Start Templates
	2 - Custom Template Location
Choice: 1

Which runtime would you like to use?
	1 - nodejs12.x
	2 - python3.8
	3 - ruby2.7
	4 - go1.x
	5 - java11
	6 - dotnetcore2.1
	7 - nodejs10.x
	8 - python3.7
	9 - python3.6
	10 - python2.7
	11 - ruby2.5
	12 - java8
	13 - dotnetcore2.0
	14 - dotnetcore1.0
Runtime: 8

Project name [sam-app]: sam-app

Cloning app templates from https://github.com/awslabs/aws-sam-cli-app-templates.git

AWS quick start application templates:
	1 - Hello World Example
	2 - EventBridge Hello World
	3 - EventBridge App from scratch (100+ Event Schemas)
Template selection: 1

-----------------------
Generating application:
-----------------------
Name: sam-app
Runtime: python3.7
Dependency Manager: pip
Application Template: hello-world
Output Directory: .

Next steps can be found in the README file at ./sam-app/README.md

➜  sam ls
sam-app
➜  sam tree sam-app
sam-app
β”œβ”€β”€ README.md
β”œβ”€β”€ events
β”‚   └── event.json
β”œβ”€β”€ hello_world
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ app.py
β”‚   └── requirements.txt
β”œβ”€β”€ template.yaml
└── tests
    └── unit
        β”œβ”€β”€ __init__.py
        └── test_handler.py

4 directories, 8 files
➜  sam ls ~/ -alF
ls: -alF: No such file or directory
/Users/yuchulkim/:
Applications             Movies                   Vagrant                  rpro.log
Applications (Parallels) Music                    VirtualBox VMs           work
Desktop                  Parallels                cache.ga                 z.netrc
Documents                Pictures                 datamodeler.log
Downloads                Projects                 env
Library                  Public                   lastkeywordgomhleper.dat
➜  sam ls -alF ~
total 1288
drwxr-xr-x+ 97 yuchulkim  staff    3104 Mar 18 14:41 ./
drwxr-xr-x   7 root       admin     224 Sep 30 05:22 ../
-r--------   1 yuchulkim  staff       7 Oct 26  2018 .CFUserTextEncoding
-rw-r--r--@  1 yuchulkim  staff   18436 Feb 28 16:17 .DS_Store
drwxr-xr-x   3 yuchulkim  staff      96 Oct 13  2018 .IdentityService/
-rw-------   1 yuchulkim  staff     345 Feb 22  2019 .Rhistory
drwx------   3 yuchulkim  staff      96 May 24  2019 .ServiceHub/
drwx------   2 yuchulkim  staff      64 Mar 10 09:24 .Trash/
drwxr-xr-x   3 yuchulkim  staff      96 Aug 19  2019 .anaconda/
drwxr-xr-x   4 yuchulkim  staff     128 Oct 13  2018 .android/
drwxr-xr-x   3 yuchulkim  staff      96 Nov 16  2018 .aspnet/
drwxr-xr-x   4 yuchulkim  staff     128 Feb 23 16:54 .aws/
drwx------   4 yuchulkim  staff     128 Mar 18 14:39 .aws-sam/
drwxr-xr-x   3 yuchulkim  staff      96 Oct 15 23:08 .azuredatastudio/
-rw-------   1 yuchulkim  staff       4 Jul 26  2019 .bash_history
-rw-r--r--   1 yuchulkim  staff      41 Oct 26  2018 .bashrc
drwxr-xr-x   3 yuchulkim  staff      96 Jan  2  2018 .bundle/
drwxr-xr-x   6 yuchulkim  staff     192 Sep 22  2017 .codeintel/
drwxr-xr-x   2 yuchulkim  staff      64 Aug 19  2019 .conda/
-rw-r--r--   1 yuchulkim  staff      40 Aug 19  2019 .condarc
drwxr-xr-x  10 yuchulkim  staff     320 Oct 26  2018 .config/
drwxr-xr-x   3 yuchulkim  staff      96 Mar 18 14:40 .cookiecutter_replay/
drwxr-xr-x   3 yuchulkim  staff      96 Jul 14  2018 .dbeaver-drivers/
drwxr-xr-x   4 yuchulkim  staff     128 Jul 14  2018 .dbeaver4/
-rw-r--r--   1 yuchulkim  staff     168 Nov  9  2018 .delfino.conf
drwxr-xr-x   7 yuchulkim  staff     224 Mar 10 09:24 .docker/
drwxr-xr-x   8 yuchulkim  staff     256 Oct 13  2018 .dotnet/
drwxr-xr-x   3 yuchulkim  staff      96 Oct 15 22:41 .eclipse/
-rw-------   1 yuchulkim  staff   15843 Mar 18 14:40 .fasd
-rw-r--r--   1 yuchulkim  staff     328 Oct 26  2018 .fzf.bash
-rw-r--r--   1 yuchulkim  staff     326 Oct 26  2018 .fzf.zsh
drwxr-xr-x   4 yuchulkim  staff     128 Jan  2  2018 .gem/
-rw-r--r--   1 yuchulkim  staff      94 Dec 22  2017 .gitconfig
drwx------   3 yuchulkim  staff      96 Feb  2  2018 .httpie/
drwxr-xr-x   5 yuchulkim  staff     160 Aug 15  2019 .ipython/
drwxr-xr-x   3 yuchulkim  staff      96 Aug 15  2019 .jupyter/
drwxr-xr-x   5 yuchulkim  staff     160 Jun 14  2019 .kube/
drwxrwxrwx   3 yuchulkim  staff      96 Oct 13  2018 .local/
drwxr-xr-x   4 yuchulkim  staff     128 Aug 15  2019 .matplotlib/
drwxr-xr-x  23 yuchulkim  staff     736 Jun 14  2019 .minikube/
drwxr-xr-x   3 yuchulkim  staff      96 Jan 25  2018 .mono/
drwxr-xr-x   8 yuchulkim  staff     256 Jul 26  2019 .mume/
-rw-------   1 yuchulkim  staff      13 Mar 10 11:11 .node_repl_history
drwxr-xr-x   9 yuchulkim  staff     288 Mar 18 12:07 .nodebrew/
drwxr-xr-x   7 yuchulkim  staff     224 Oct 13  2018 .npm/
drwxr-xr-x   4 yuchulkim  staff     128 Oct 13  2018 .nuget/
drwxr-xr-x  16 yuchulkim  staff     512 Aug  2  2017 .oh-my-zsh/
drwxr-xr-x   5 yuchulkim  staff     160 Oct 13  2018 .oracle_jre_usage/
-rw-------   1 yuchulkim  staff     470 Jul 26  2019 .pry_history
drwxr-xr-x   5 yuchulkim  staff     160 Aug 15  2019 .pyenv/
drwxr-xr-x  12 yuchulkim  staff     384 Mar 10 15:44 .pylint.d/
-rw-------   1 yuchulkim  staff     136 Mar 16 13:39 .python_history
drwxr-xr-x  20 yuchulkim  staff     640 Jan 24  2018 .rbenv/
-rw-------   1 yuchulkim  staff     222 Jun 15  2019 .rediscli_history
drwxr-xr-x   3 yuchulkim  staff      96 Nov 17  2017 .rprodlx/
drwxr-xr-x  22 yuchulkim  staff     704 Jan 24 15:15 .rstudio-desktop/
drwxr-xr-x   4 yuchulkim  staff     128 Feb 11 12:39 .serverless/
-rw-r--r--   1 yuchulkim  staff     207 Feb 11 12:39 .serverlessrc
-rw-------   1 yuchulkim  staff       4 Jul 26  2019 .sh_history
drwxr-xr-x   3 yuchulkim  staff      96 Jun 15  2019 .solargraph/
drwxr-xr-x   7 yuchulkim  staff     224 Oct 16 00:21 .sqldeveloper/
-rw-------   1 yuchulkim  staff      61 Jul 26  2019 .sqlite_history
drwx------   6 yuchulkim  staff     192 Jul 26  2019 .ssh/
drwxr-xr-x   6 yuchulkim  staff     192 Jan 24  2018 .subversion/
drwxr-xr-x   5 yuchulkim  staff     160 Jun 24  2019 .templateengine/
drwxr-xr-x  10 yuchulkim  staff     320 Jul 26  2019 .vagrant.d/
-rw-------   1 yuchulkim  staff   13557 Oct 16 00:29 .viminfo
drwxr-xr-x   4 yuchulkim  staff     128 Feb  2 15:33 .vscode/
-rw-r--r--   1 yuchulkim  staff     116 Feb 11 13:30 .yarnrc
-rw-r--r--   1 yuchulkim  staff   39213 Aug  9  2017 .zcompdump-yuchul’s MacBook Pro-5.2
-rw-r--r--   1 yuchulkim  staff   40585 Aug 19  2019 .zcompdump-yuchul’s MacBook Pro-5.3
-rw-r--r--   1 yuchulkim  staff   46695 Feb 24 15:01 .zcompdump-yuchul’s MacBook Pro-5.7.1
-rw-r--r--   1 yuchulkim  staff      17 Oct 14  2017 .zsh-update
-rw-------   1 yuchulkim  staff  174753 Mar 18 14:41 .zsh_history
-rw-r--r--   1 yuchulkim  staff    3657 Oct 16 00:02 .zshrc
-rw-r--r--   1 yuchulkim  staff    4042 Aug  2  2017 .zshrc.pre-oh-my-zsh
drwx------@  7 yuchulkim  staff     224 Feb 28 13:41 Applications/
drwxr-xr-x@  4 yuchulkim  staff     128 Mar  4 08:12 Applications (Parallels)/
drwx------@ 14 yuchulkim  staff     448 Mar  4 19:30 Desktop/
drwx------@ 19 yuchulkim  staff     608 Mar  4 19:28 Documents/
drwx------@ 14 yuchulkim  staff     448 Mar 18 11:28 Downloads/
drwx------@ 83 yuchulkim  staff    2656 Oct 16 00:22 Library/
drwx------+  7 yuchulkim  staff     224 Mar  4 19:28 Movies/
drwx------+  7 yuchulkim  staff     224 Mar  4 19:28 Music/
drwxr-xr-x   5 yuchulkim  staff     160 Aug 12  2017 Parallels/
drwx------+  9 yuchulkim  staff     288 Mar  4 19:28 Pictures/
drwxr-xr-x   4 yuchulkim  staff     128 May 24  2019 Projects/
drwxr-xr-x+  5 yuchulkim  staff     160 Aug  2  2017 Public/
drwxr-xr-x   6 yuchulkim  staff     192 Feb 25  2019 Vagrant/
drwx------   3 yuchulkim  staff      96 Jul 26  2019 VirtualBox VMs/
-rw-r--r--   1 yuchulkim  staff     219 May 26  2018 cache.ga
-rw-r--r--   1 yuchulkim  staff      77 Oct 16 00:19 datamodeler.log
drwxr-xr-x   7 yuchulkim  staff     224 Dec 22  2017 env/
-rw-r--r--   1 yuchulkim  staff      35 Dec 19  2017 lastkeywordgomhleper.dat
-rw-r--r--   1 yuchulkim  staff  189151 Nov 17  2017 rpro.log
drwxr-xr-x  17 yuchulkim  staff     544 Mar 18 14:37 work/
-rw-r--r--   1 yuchulkim  staff      57 Aug 15  2019 z.netrc
➜  sam
➜  sam cat ~/.aws/credentials
[default]
aws_access_key_id = AKIAU4PSOT3EDAC23XRR
aws_secret_access_key = 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
➜  sam sam build
Error: Template file not found at /Users/yuchulkim/work/sam/template.yml
➜  sam ls
sam-app
➜  sam ls -alF
total 0
drwxr-xr-x   3 yuchulkim  staff   96 Mar 18 14:40 ./
drwxr-xr-x  17 yuchulkim  staff  544 Mar 18 14:37 ../
drwxr-xr-x   8 yuchulkim  staff  256 Mar 18 14:40 sam-app/
➜  sam cd sam-app
➜  sam-app sam build
Building resource 'HelloWorldFunction'
Running PythonPipBuilder:ResolveDependencies
Running PythonPipBuilder:CopySource

Build Succeeded

Built Artifacts  : .aws-sam/build
Built Template   : .aws-sam/build/template.yaml

Commands you can use next
=========================
[*] Invoke Function: sam local invoke
[*] Deploy: sam deploy --guided

➜  sam-app ls -alF
total 32
drwxr-xr-x  9 yuchulkim  staff   288 Mar 18 14:42 ./
drwxr-xr-x  3 yuchulkim  staff    96 Mar 18 14:40 ../
drwxr-xr-x  3 yuchulkim  staff    96 Mar 18 14:42 .aws-sam/
-rw-r--r--  1 yuchulkim  staff  3730 Mar 18 14:40 .gitignore
-rw-r--r--  1 yuchulkim  staff  7490 Mar 18 14:40 README.md
drwxr-xr-x  3 yuchulkim  staff    96 Mar 18 14:40 events/
drwxr-xr-x  5 yuchulkim  staff   160 Mar 18 14:40 hello_world/
-rw-r--r--  1 yuchulkim  staff  1623 Mar 18 14:40 template.yaml
drwxr-xr-x  3 yuchulkim  staff    96 Mar 18 14:40 tests/
➜  sam-app tree
.
β”œβ”€β”€ README.md
β”œβ”€β”€ events
β”‚   └── event.json
β”œβ”€β”€ hello_world
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ app.py
β”‚   └── requirements.txt
β”œβ”€β”€ template.yaml
└── tests
    └── unit
        β”œβ”€β”€ __init__.py
        └── test_handler.py

4 directories, 8 files
➜  sam-app tree --help
usage: tree [-acdfghilnpqrstuvxACDFJQNSUX] [-H baseHREF] [-T title ]
	[-L level [-R]] [-P pattern] [-I pattern] [-o filename] [--version]
	[--help] [--inodes] [--device] [--noreport] [--nolinks] [--dirsfirst]
	[--charset charset] [--filelimit[=]#] [--si] [--timefmt[=]<f>]
	[--sort[=]<name>] [--matchdirs] [--ignore-case] [--fromfile] [--]
	[<directory list>]
  ------- Listing options -------
  -a            All files are listed.
  -d            List directories only.
  -l            Follow symbolic links like directories.
  -f            Print the full path prefix for each file.
  -x            Stay on current filesystem only.
  -L level      Descend only level directories deep.
  -R            Rerun tree when max dir level reached.
  -P pattern    List only those files that match the pattern given.
  -I pattern    Do not list files that match the given pattern.
  --ignore-case Ignore case when pattern matching.
  --matchdirs   Include directory names in -P pattern matching.
  --noreport    Turn off file/directory count at end of tree listing.
  --charset X   Use charset X for terminal/HTML and indentation line output.
  --filelimit # Do not descend dirs with more than # files in them.
  --timefmt <f> Print and format time according to the format <f>.
  -o filename   Output to file instead of stdout.
  ------- File options -------
  -q            Print non-printable characters as '?'.
  -N            Print non-printable characters as is.
  -Q            Quote filenames with double quotes.
  -p            Print the protections for each file.
  -u            Displays file owner or UID number.
  -g            Displays file group owner or GID number.
  -s            Print the size in bytes of each file.
  -h            Print the size in a more human readable way.
  --si          Like -h, but use in SI units (powers of 1000).
  -D            Print the date of last modification or (-c) status change.
  -F            Appends '/', '=', '*', '@', '|' or '>' as per ls -F.
  --inodes      Print inode number of each file.
  --device      Print device ID number to which each file belongs.
  ------- Sorting options -------
  -v            Sort files alphanumerically by version.
  -t            Sort files by last modification time.
  -c            Sort files by last status change time.
  -U            Leave files unsorted.
  -r            Reverse the order of the sort.
  --dirsfirst   List directories before files (-U disables).
  --sort X      Select sort: name,version,size,mtime,ctime.
  ------- Graphics options -------
  -i            Don't print indentation lines.
  -A            Print ANSI lines graphic indentation lines.
  -S            Print with CP437 (console) graphics indentation lines.
  -n            Turn colorization off always (-C overrides).
  -C            Turn colorization on always.
  ------- XML/HTML/JSON options -------
  -X            Prints out an XML representation of the tree.
  -J            Prints out an JSON representation of the tree.
  -H baseHREF   Prints out HTML format with baseHREF as top directory.
  -T string     Replace the default HTML title and H1 header with string.
  --nolinks     Turn off hyperlinks in HTML output.
  ------- Input options -------
  --fromfile    Reads paths from files (.=stdin)
  ------- Miscellaneous options -------
  --version     Print version and exit.
  --help        Print usage and this help message and exit.
  --            Options processing terminator.
➜  sam-app tree -alF
.
β”œβ”€β”€ .aws-sam/
β”‚   └── build/
β”‚       β”œβ”€β”€ HelloWorldFunction/
β”‚       β”‚   β”œβ”€β”€ __init__.py
β”‚       β”‚   β”œβ”€β”€ app.py
β”‚       β”‚   β”œβ”€β”€ certifi/
β”‚       β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚       β”‚   β”‚   β”œβ”€β”€ __main__.py
β”‚       β”‚   β”‚   β”œβ”€β”€ cacert.pem
β”‚       β”‚   β”‚   └── core.py
β”‚       β”‚   β”œβ”€β”€ certifi-2019.11.28.dist-info/
β”‚       β”‚   β”‚   β”œβ”€β”€ DESCRIPTION.rst
β”‚       β”‚   β”‚   β”œβ”€β”€ METADATA
β”‚       β”‚   β”‚   β”œβ”€β”€ RECORD
β”‚       β”‚   β”‚   β”œβ”€β”€ WHEEL
β”‚       β”‚   β”‚   β”œβ”€β”€ metadata.json
β”‚       β”‚   β”‚   └── top_level.txt
β”‚       β”‚   β”œβ”€β”€ chardet/
β”‚       β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚       β”‚   β”‚   β”œβ”€β”€ big5freq.py
β”‚       β”‚   β”‚   β”œβ”€β”€ big5prober.py
β”‚       β”‚   β”‚   β”œβ”€β”€ chardistribution.py
β”‚       β”‚   β”‚   β”œβ”€β”€ charsetgroupprober.py
β”‚       β”‚   β”‚   β”œβ”€β”€ charsetprober.py
β”‚       β”‚   β”‚   β”œβ”€β”€ cli/
β”‚       β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚       β”‚   β”‚   β”‚   └── chardetect.py
β”‚       β”‚   β”‚   β”œβ”€β”€ codingstatemachine.py
β”‚       β”‚   β”‚   β”œβ”€β”€ compat.py
β”‚       β”‚   β”‚   β”œβ”€β”€ cp949prober.py
β”‚       β”‚   β”‚   β”œβ”€β”€ enums.py
β”‚       β”‚   β”‚   β”œβ”€β”€ escprober.py
β”‚       β”‚   β”‚   β”œβ”€β”€ escsm.py
β”‚       β”‚   β”‚   β”œβ”€β”€ eucjpprober.py
β”‚       β”‚   β”‚   β”œβ”€β”€ euckrfreq.py
β”‚       β”‚   β”‚   β”œβ”€β”€ euckrprober.py
β”‚       β”‚   β”‚   β”œβ”€β”€ euctwfreq.py
β”‚       β”‚   β”‚   β”œβ”€β”€ euctwprober.py
β”‚       β”‚   β”‚   β”œβ”€β”€ gb2312freq.py
β”‚       β”‚   β”‚   β”œβ”€β”€ gb2312prober.py
β”‚       β”‚   β”‚   β”œβ”€β”€ hebrewprober.py
β”‚       β”‚   β”‚   β”œβ”€β”€ jisfreq.py
β”‚       β”‚   β”‚   β”œβ”€β”€ jpcntx.py
β”‚       β”‚   β”‚   β”œβ”€β”€ langbulgarianmodel.py
β”‚       β”‚   β”‚   β”œβ”€β”€ langcyrillicmodel.py
β”‚       β”‚   β”‚   β”œβ”€β”€ langgreekmodel.py
β”‚       β”‚   β”‚   β”œβ”€β”€ langhebrewmodel.py
β”‚       β”‚   β”‚   β”œβ”€β”€ langhungarianmodel.py
β”‚       β”‚   β”‚   β”œβ”€β”€ langthaimodel.py
β”‚       β”‚   β”‚   β”œβ”€β”€ langturkishmodel.py
β”‚       β”‚   β”‚   β”œβ”€β”€ latin1prober.py
β”‚       β”‚   β”‚   β”œβ”€β”€ mbcharsetprober.py
β”‚       β”‚   β”‚   β”œβ”€β”€ mbcsgroupprober.py
β”‚       β”‚   β”‚   β”œβ”€β”€ mbcssm.py
β”‚       β”‚   β”‚   β”œβ”€β”€ sbcharsetprober.py
β”‚       β”‚   β”‚   β”œβ”€β”€ sbcsgroupprober.py
β”‚       β”‚   β”‚   β”œβ”€β”€ sjisprober.py
β”‚       β”‚   β”‚   β”œβ”€β”€ universaldetector.py
β”‚       β”‚   β”‚   β”œβ”€β”€ utf8prober.py
β”‚       β”‚   β”‚   └── version.py
β”‚       β”‚   β”œβ”€β”€ chardet-3.0.4.dist-info/
β”‚       β”‚   β”‚   β”œβ”€β”€ DESCRIPTION.rst
β”‚       β”‚   β”‚   β”œβ”€β”€ METADATA
β”‚       β”‚   β”‚   β”œβ”€β”€ RECORD
β”‚       β”‚   β”‚   β”œβ”€β”€ WHEEL
β”‚       β”‚   β”‚   β”œβ”€β”€ entry_points.txt
β”‚       β”‚   β”‚   β”œβ”€β”€ metadata.json
β”‚       β”‚   β”‚   └── top_level.txt
β”‚       β”‚   β”œβ”€β”€ idna/
β”‚       β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚       β”‚   β”‚   β”œβ”€β”€ codec.py
β”‚       β”‚   β”‚   β”œβ”€β”€ compat.py
β”‚       β”‚   β”‚   β”œβ”€β”€ core.py
β”‚       β”‚   β”‚   β”œβ”€β”€ idnadata.py
β”‚       β”‚   β”‚   β”œβ”€β”€ intranges.py
β”‚       β”‚   β”‚   β”œβ”€β”€ package_data.py
β”‚       β”‚   β”‚   └── uts46data.py
β”‚       β”‚   β”œβ”€β”€ idna-2.9.dist-info/
β”‚       β”‚   β”‚   β”œβ”€β”€ LICENSE.rst
β”‚       β”‚   β”‚   β”œβ”€β”€ METADATA
β”‚       β”‚   β”‚   β”œβ”€β”€ RECORD
β”‚       β”‚   β”‚   β”œβ”€β”€ WHEEL
β”‚       β”‚   β”‚   └── top_level.txt
β”‚       β”‚   β”œβ”€β”€ requests/
β”‚       β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚       β”‚   β”‚   β”œβ”€β”€ __version__.py
β”‚       β”‚   β”‚   β”œβ”€β”€ _internal_utils.py
β”‚       β”‚   β”‚   β”œβ”€β”€ adapters.py
β”‚       β”‚   β”‚   β”œβ”€β”€ api.py
β”‚       β”‚   β”‚   β”œβ”€β”€ auth.py
β”‚       β”‚   β”‚   β”œβ”€β”€ certs.py
β”‚       β”‚   β”‚   β”œβ”€β”€ compat.py
β”‚       β”‚   β”‚   β”œβ”€β”€ cookies.py
β”‚       β”‚   β”‚   β”œβ”€β”€ exceptions.py
β”‚       β”‚   β”‚   β”œβ”€β”€ help.py
β”‚       β”‚   β”‚   β”œβ”€β”€ hooks.py
β”‚       β”‚   β”‚   β”œβ”€β”€ models.py
β”‚       β”‚   β”‚   β”œβ”€β”€ packages.py
β”‚       β”‚   β”‚   β”œβ”€β”€ sessions.py
β”‚       β”‚   β”‚   β”œβ”€β”€ status_codes.py
β”‚       β”‚   β”‚   β”œβ”€β”€ structures.py
β”‚       β”‚   β”‚   └── utils.py
β”‚       β”‚   β”œβ”€β”€ requests-2.23.0.dist-info/
β”‚       β”‚   β”‚   β”œβ”€β”€ LICENSE
β”‚       β”‚   β”‚   β”œβ”€β”€ METADATA
β”‚       β”‚   β”‚   β”œβ”€β”€ RECORD
β”‚       β”‚   β”‚   β”œβ”€β”€ WHEEL
β”‚       β”‚   β”‚   └── top_level.txt
β”‚       β”‚   β”œβ”€β”€ requirements.txt
β”‚       β”‚   β”œβ”€β”€ urllib3/
β”‚       β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚       β”‚   β”‚   β”œβ”€β”€ _collections.py
β”‚       β”‚   β”‚   β”œβ”€β”€ connection.py
β”‚       β”‚   β”‚   β”œβ”€β”€ connectionpool.py
β”‚       β”‚   β”‚   β”œβ”€β”€ contrib/
β”‚       β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚       β”‚   β”‚   β”‚   β”œβ”€β”€ _appengine_environ.py
β”‚       β”‚   β”‚   β”‚   β”œβ”€β”€ _securetransport/
β”‚       β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚       β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ bindings.py
β”‚       β”‚   β”‚   β”‚   β”‚   └── low_level.py
β”‚       β”‚   β”‚   β”‚   β”œβ”€β”€ appengine.py
β”‚       β”‚   β”‚   β”‚   β”œβ”€β”€ ntlmpool.py
β”‚       β”‚   β”‚   β”‚   β”œβ”€β”€ pyopenssl.py
β”‚       β”‚   β”‚   β”‚   β”œβ”€β”€ securetransport.py
β”‚       β”‚   β”‚   β”‚   └── socks.py
β”‚       β”‚   β”‚   β”œβ”€β”€ exceptions.py
β”‚       β”‚   β”‚   β”œβ”€β”€ fields.py
β”‚       β”‚   β”‚   β”œβ”€β”€ filepost.py
β”‚       β”‚   β”‚   β”œβ”€β”€ packages/
β”‚       β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚       β”‚   β”‚   β”‚   β”œβ”€β”€ backports/
β”‚       β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚       β”‚   β”‚   β”‚   β”‚   └── makefile.py
β”‚       β”‚   β”‚   β”‚   β”œβ”€β”€ six.py
β”‚       β”‚   β”‚   β”‚   └── ssl_match_hostname/
β”‚       β”‚   β”‚   β”‚       β”œβ”€β”€ __init__.py
β”‚       β”‚   β”‚   β”‚       └── _implementation.py
β”‚       β”‚   β”‚   β”œβ”€β”€ poolmanager.py
β”‚       β”‚   β”‚   β”œβ”€β”€ request.py
β”‚       β”‚   β”‚   β”œβ”€β”€ response.py
β”‚       β”‚   β”‚   └── util/
β”‚       β”‚   β”‚       β”œβ”€β”€ __init__.py
β”‚       β”‚   β”‚       β”œβ”€β”€ connection.py
β”‚       β”‚   β”‚       β”œβ”€β”€ queue.py
β”‚       β”‚   β”‚       β”œβ”€β”€ request.py
β”‚       β”‚   β”‚       β”œβ”€β”€ response.py
β”‚       β”‚   β”‚       β”œβ”€β”€ retry.py
β”‚       β”‚   β”‚       β”œβ”€β”€ ssl_.py
β”‚       β”‚   β”‚       β”œβ”€β”€ timeout.py
β”‚       β”‚   β”‚       β”œβ”€β”€ url.py
β”‚       β”‚   β”‚       └── wait.py
β”‚       β”‚   └── urllib3-1.25.8.dist-info/
β”‚       β”‚       β”œβ”€β”€ LICENSE.txt
β”‚       β”‚       β”œβ”€β”€ METADATA
β”‚       β”‚       β”œβ”€β”€ RECORD
β”‚       β”‚       β”œβ”€β”€ WHEEL
β”‚       β”‚       └── top_level.txt
β”‚       └── template.yaml
β”œβ”€β”€ .gitignore
β”œβ”€β”€ README.md
β”œβ”€β”€ events/
β”‚   └── event.json
β”œβ”€β”€ hello_world/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ app.py
β”‚   └── requirements.txt
β”œβ”€β”€ template.yaml
└── tests/
    └── unit/
        β”œβ”€β”€ __init__.py
        └── test_handler.py

24 directories, 148 files
➜  sam-app
➜  sam-app sam deploy --guided

Configuring SAM deploy
======================

	Looking for samconfig.toml :  Not found

	Setting default arguments for 'sam deploy'
	=========================================
	Stack Name [sam-app]:
	AWS Region [us-east-1]: ap-northeast-1
	#Shows you resources changes to be deployed and require a 'Y' to initiate deploy
	Confirm changes before deploy [y/N]: y
	#SAM needs permission to be able to create roles to connect to the resources in your template
	Allow SAM CLI IAM role creation [Y/n]: y
	Save arguments to samconfig.toml [Y/n]: y

	Looking for resources needed for deployment: Not found.
	Creating the required resources...
	Successfully created!

		Managed S3 bucket: aws-sam-cli-managed-default-samclisourcebucket-7mq2kwuqu93u
		A different default S3 bucket can be set in samconfig.toml

	Saved arguments to config file
	Running 'sam deploy' for future deployments will use the parameters saved above.
	The above parameters can be changed by modifying samconfig.toml
	Learn more about samconfig.toml syntax at
	https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-config.html

	Deploying with following values
	===============================
	Stack name                 : sam-app
	Region                     : ap-northeast-1
	Confirm changeset          : True
	Deployment s3 bucket       : aws-sam-cli-managed-default-samclisourcebucket-7mq2kwuqu93u
	Capabilities               : ["CAPABILITY_IAM"]
	Parameter overrides        : {}

Initiating deployment
=====================
Uploading to sam-app/54509d64c017c4e43e85cbfbb965b885  532559 / 532559.0  (100.00%)
Uploading to sam-app/06f6417779a4aa1bb8b52fd81a39257d.template  1089 / 1089.0  (100.00%)

Waiting for changeset to be created..

CloudFormation stack changeset
---------------------------------------------------------------------------------------------------------------------
Operation                               LogicalResourceId                       ResourceType
---------------------------------------------------------------------------------------------------------------------
+ Add                                   HelloWorldFunctionHelloWorldPermissio   AWS::Lambda::Permission
                                        nProd
+ Add                                   HelloWorldFunctionRole                  AWS::IAM::Role
+ Add                                   HelloWorldFunction                      AWS::Lambda::Function
+ Add                                   ServerlessRestApiDeployment47fc2d5f9d   AWS::ApiGateway::Deployment
+ Add                                   ServerlessRestApiProdStage              AWS::ApiGateway::Stage
+ Add                                   ServerlessRestApi                       AWS::ApiGateway::RestApi
---------------------------------------------------------------------------------------------------------------------

Changeset created successfully. arn:aws:cloudformation:ap-northeast-1:336052788936:changeSet/samcli-deploy1584510380/c2fae058-e0a7-4c60-a7da-7355c1872410


Previewing CloudFormation changeset before deployment
======================================================
Deploy this changeset? [y/N]:
➜  sam-app sam deploy --guided

Configuring SAM deploy
======================

	Looking for samconfig.toml :  Found
	Reading default arguments  :  Success

	Setting default arguments for 'sam deploy'
	=========================================
	Stack Name [sam-app]:
	AWS Region [ap-northeast-1]:
	#Shows you resources changes to be deployed and require a 'Y' to initiate deploy
	Confirm changes before deploy [Y/n]:
	#SAM needs permission to be able to create roles to connect to the resources in your template
	Allow SAM CLI IAM role creation [Y/n]:
	Save arguments to samconfig.toml [Y/n]:

	Looking for resources needed for deployment: Found!

		Managed S3 bucket: aws-sam-cli-managed-default-samclisourcebucket-7mq2kwuqu93u
		A different default S3 bucket can be set in samconfig.toml

	Saved arguments to config file
	Running 'sam deploy' for future deployments will use the parameters saved above.
	The above parameters can be changed by modifying samconfig.toml
	Learn more about samconfig.toml syntax at
	https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-config.html

	Deploying with following values
	===============================
	Stack name                 : sam-app
	Region                     : ap-northeast-1
	Confirm changeset          : True
	Deployment s3 bucket       : aws-sam-cli-managed-default-samclisourcebucket-7mq2kwuqu93u
	Capabilities               : ["CAPABILITY_IAM"]
	Parameter overrides        : {}

Initiating deployment
=====================

Waiting for changeset to be created..

CloudFormation stack changeset
---------------------------------------------------------------------------------------------------------------------
Operation                               LogicalResourceId                       ResourceType
---------------------------------------------------------------------------------------------------------------------
+ Add                                   HelloWorldFunctionHelloWorldPermissio   AWS::Lambda::Permission
                                        nProd
+ Add                                   HelloWorldFunctionRole                  AWS::IAM::Role
+ Add                                   HelloWorldFunction                      AWS::Lambda::Function
+ Add                                   ServerlessRestApiDeployment47fc2d5f9d   AWS::ApiGateway::Deployment
+ Add                                   ServerlessRestApiProdStage              AWS::ApiGateway::Stage
+ Add                                   ServerlessRestApi                       AWS::ApiGateway::RestApi
---------------------------------------------------------------------------------------------------------------------

Changeset created successfully. arn:aws:cloudformation:ap-northeast-1:336052788936:changeSet/samcli-deploy1584510459/30f08ff5-eb03-47d3-b45c-4a2f8a6429e6


Previewing CloudFormation changeset before deployment
======================================================
Deploy this changeset? [y/N]: y

2020-03-18 14:47:49 - Waiting for stack create/update to complete

CloudFormation events from changeset
---------------------------------------------------------------------------------------------------------------------
ResourceStatus                ResourceType                  LogicalResourceId             ResourceStatusReason
---------------------------------------------------------------------------------------------------------------------
CREATE_IN_PROGRESS            AWS::IAM::Role                HelloWorldFunctionRole        -
CREATE_IN_PROGRESS            AWS::IAM::Role                HelloWorldFunctionRole        Resource creation Initiated
CREATE_COMPLETE               AWS::IAM::Role                HelloWorldFunctionRole        -
CREATE_IN_PROGRESS            AWS::Lambda::Function         HelloWorldFunction            -
CREATE_IN_PROGRESS            AWS::Lambda::Function         HelloWorldFunction            Resource creation Initiated
CREATE_COMPLETE               AWS::Lambda::Function         HelloWorldFunction            -
CREATE_IN_PROGRESS            AWS::ApiGateway::RestApi      ServerlessRestApi             Resource creation Initiated
CREATE_IN_PROGRESS            AWS::ApiGateway::RestApi      ServerlessRestApi             -
CREATE_COMPLETE               AWS::ApiGateway::RestApi      ServerlessRestApi             -
CREATE_IN_PROGRESS            AWS::ApiGateway::Deployment   ServerlessRestApiDeployment   -
                                                            47fc2d5f9d
CREATE_IN_PROGRESS            AWS::Lambda::Permission       HelloWorldFunctionHelloWorl   Resource creation Initiated
                                                            dPermissionProd
CREATE_IN_PROGRESS            AWS::Lambda::Permission       HelloWorldFunctionHelloWorl   -
                                                            dPermissionProd
CREATE_COMPLETE               AWS::ApiGateway::Deployment   ServerlessRestApiDeployment   -
                                                            47fc2d5f9d
CREATE_IN_PROGRESS            AWS::ApiGateway::Deployment   ServerlessRestApiDeployment   Resource creation Initiated
                                                            47fc2d5f9d
CREATE_IN_PROGRESS            AWS::ApiGateway::Stage        ServerlessRestApiProdStage    -
CREATE_IN_PROGRESS            AWS::ApiGateway::Stage        ServerlessRestApiProdStage    Resource creation Initiated
CREATE_COMPLETE               AWS::ApiGateway::Stage        ServerlessRestApiProdStage    -
CREATE_COMPLETE               AWS::Lambda::Permission       HelloWorldFunctionHelloWorl   -
                                                            dPermissionProd
CREATE_COMPLETE               AWS::CloudFormation::Stack    sam-app                       -
---------------------------------------------------------------------------------------------------------------------

CloudFormation outputs from deployed stack
---------------------------------------------------------------------------------------------------------------------
Outputs
---------------------------------------------------------------------------------------------------------------------
Key                 HelloWorldFunctionIamRole
Description         Implicit IAM Role created for Hello World function
Value               arn:aws:iam::336052788936:role/sam-app-HelloWorldFunctionRole-B4XCRYZMNNHP

Key                 HelloWorldApi
Description         API Gateway endpoint URL for Prod stage for Hello World function
Value               https://5kauerdndj.execute-api.ap-northeast-1.amazonaws.com/Prod/hello/

Key                 HelloWorldFunction
Description         Hello World Lambda Function ARN
Value               arn:aws:lambda:ap-northeast-1:336052788936:function:sam-app-HelloWorldFunction-9B4IKWH79L8E
---------------------------------------------------------------------------------------------------------------------

Successfully created/updated stack - sam-app in ap-northeast-1

➜  sam-app curl https://5kauerdndj.execute-api.ap-northeast-1.amazonaws.com/Prod/hello/
{"message": "hello world"}%                                                                                             ➜  sam-app sam local start-api
Mounting HelloWorldFunction at http://127.0.0.1:3000/hello [GET]
You can now browse to the above endpoints to invoke your functions. You do not need to restart/reload SAM CLI while working on your functions, changes will be reflected instantly/automatically. You only need to restart SAM CLI if you update your AWS SAM template
2020-03-18 14:50:16  * Running on http://127.0.0.1:3000/ (Press CTRL+C to quit)

Invoking app.lambda_handler (python3.7)

Fetching lambci/lambda:python3.7 Docker container image......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Mounting /Users/yuchulkim/work/sam/sam-app/.aws-sam/build/HelloWorldFunction as /var/task:ro,delegated inside runtime container
START RequestId: 29a9f7d1-e82e-1649-d889-8f4d303f28d7 Version: $LATEST
END RequestId: 29a9f7d1-e82e-1649-d889-8f4d303f28d7
REPORT RequestId: 29a9f7d1-e82e-1649-d889-8f4d303f28d7	Init Duration: 173.32 ms	Duration: 5.23 ms	Billed Duration: 100 ms	Memory Size: 128 MB	Max Memory Used: 23 MB
No Content-Type given. Defaulting to 'application/json'.
2020-03-18 14:53:34 127.0.0.1 - - [18/Mar/2020 14:53:34] "GET /hello HTTP/1.1" 200 -
⚠️ **GitHub.com Fallback** ⚠️