Skip to content

Commit

Permalink
Merge pull request #2070 from ResearchHub/dev-aws-profile
Browse files Browse the repository at this point in the history
Use AWS profile for local development
  • Loading branch information
gzurowski authored Jan 16, 2025
2 parents fbbc240 + 5d84306 commit 8a13ed1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,12 @@
"remote.autoForwardPorts": false
}
}
}
},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"

"mounts": [
"source=${localEnv:HOME}/.aws,target=/home/vscode/.aws,type=bind,readonly"
]
}
4 changes: 4 additions & 0 deletions src/researchhub/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,10 @@ def silky_capture(request):

AWS_REGION_NAME = os.environ.get("AWS_REGION_NAME", keys.AWS_REGION_NAME)

if not (CLOUD or TESTING) and os.environ.get("AWS_PROFILE") is None:
# Set AWS profile for local development
os.environ["AWS_PROFILE"] = keys.AWS_PROFILE

# AWS Lambda

GHOSTSCRIPT_LAMBDA_ARN = os.environ.get(
Expand Down

0 comments on commit 8a13ed1

Please sign in to comment.