Setting up CI/CD with AWS CodePipeline and CodeBuild for Angular 8 serverless website (AWS Cloudfront and S3)

my-MacBook-Pro:~ me$ pip3 install virtualenv

Collecting virtualenv

Downloading https://files.pythonhosted.org/packages/c5/97/00dd42a0fc41e9016b23f07ec7f657f636cb672fad9cf72b80f8f65c6a46/virtualenv-16.7.7-py2.py3-none-any.whl (3.4MB)

100% |████████████████████████████████| 3.4MB 5.7MB/s

Installing collected packages: virtualenv

Successfully installed virtualenv-16.7.7

my-MacBook-Pro:proj me$ virtualenv proj_venv

Using base prefix ‘/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7’

New python executable in /Users/me/me/proj_venv/bin/python3.7

Also creating executable in /Users/me/me/proj_venv/bin/python

Installing setuptools, pip, wheel…

done.

my-MacBook-Pro:me my$ source proj_venv/bin/activate

(proj_venv) my-MacBook-Pro:proj me$

(proj_venv) my-MacBook-Pro:proj me$ ng — versionAngular CLI: 8.3.17Node: 10.9.0OS: darwin x64Angular:...Package                      Version------------------------------------------------------@angular-devkit/architect    0.803.17@angular-devkit/core         8.3.17@angular-devkit/schematics   8.3.17@angular/cli                 8.3.17@schematics/angular          8.3.17@schematics/update           0.803.17rxjs                         6.4.0
Aah! Makes me happy…I guess this was the easy part.
(proj_venv) my-MacBook-Pro:project me$ pwd/Users/me/me/project(proj_venv) my-MacBook-Pro:project me$ git remote add origin https://github.com/<user>/<project>.git(proj_venv) my-MacBook-Pro:project me$ git remote -vorigin https://github.com/<user>/<project>.git (fetch)origin https://github.com/<user>/<project>.git (push)
(proj_venv) my-MacBook-Pro:project me$ git push -u origin master
ng build --prod=true --aot
version: 0.2phases:
install:
runtime-versions:
nodejs: 10
commands:
- npm install
- npm install -g
@angular/cli
#pre_build:
#commands:
# - command
# - command
build:
commands:
- ng build --prod=true --aot
post_build:
commands:
- aws s3 cp dist/<projfolder>/ s3://<yourbucketname> --recursive

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store