Add optional argument for using AWS credentials profile.

Update docs.

Update tests. No need to include __pycache__ directory.

Update .gitignore to ignore test cache output.
This commit is contained in:
Paul Harrison
2017-05-26 14:42:25 +01:00
parent f3980db66c
commit 934a98c11d
5 changed files with 28 additions and 2 deletions

View File

@@ -6,6 +6,7 @@
PROJECT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
BUCKET = {{ cookiecutter.s3_bucket }}
PROFILE = {{ cookiecutter.aws_profile }}
PROJECT_NAME = {{ cookiecutter.repo_name }}
PYTHON_INTERPRETER = {{ cookiecutter.python_interpreter }}
@@ -37,11 +38,19 @@ lint:
## Upload Data to S3
sync_data_to_s3:
ifeq (default,$(PROFILE))
aws s3 sync data/ s3://$(BUCKET)/data/
else
aws s3 sync data/ s3://$(BUCKET)/data/ --profile $(PROFILE)
endif
## Download Data from S3
sync_data_from_s3:
ifeq (default,$(PROFILE))
aws s3 sync s3://$(BUCKET)/data/ data/
else
aws s3 sync s3://$(BUCKET)/data/ data/ --profile $(PROFILE)
endif
## Set up python interpreter environment
create_environment: