Skip to content

Commit

Permalink
Merge pull request #61 from nathanegillett/upload-ex
Browse files Browse the repository at this point in the history
Update examples/s3-upload and api-guide for multi-environment use
  • Loading branch information
negillett committed Oct 23, 2020
2 parents b8cae9e + 654a4d0 commit 1c00734
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/api-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Usage:
verify='/path/to/bundle.pem',
config=Config(client_cert=('client.crt', 'client.key')))
# Bucket name must match one of the environments defined in exodus-gw.ini
# Bucket name must match one of the section names in exodus-gw.ini without 'env.' prefix
bucket = s3.Bucket('dev')
# Basic APIs such as upload_file now work as usual
bucket.upload_file('/tmp/hello.txt',
Expand Down
4 changes: 2 additions & 2 deletions examples/s3-upload
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def main():
"--debug", action="store_true", help="Enable verbose logging"
)
parser.add_argument("--endpoint-url", default=None)
parser.add_argument("--bucket", default="exodus-cdn-dev")
parser.add_argument("--env", default="dev")
parser.add_argument("files", nargs="+")

args = parser.parse_args()
Expand All @@ -53,7 +53,7 @@ def main():
logging.basicConfig(level=logging.DEBUG)

s3 = boto3.resource("s3", endpoint_url=args.endpoint_url)
bucket = s3.Bucket(args.bucket)
bucket = s3.Bucket(args.env)

print(
"Using endpoint:",
Expand Down

0 comments on commit 1c00734

Please sign in to comment.