- listing containers
- creating containers
- uploading files
- listing files
- deleting files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var AWS = require('aws-sdk'); | |
| AWS.config.update({ | |
| accessKeyId: '{AWS_KEY}', | |
| secretAccessKey: '{AWS_SECRET}', | |
| region: '{SNS_REGION}' | |
| }); | |
| var sns = new AWS.SNS(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Model(AttrDict): | |
| read_preference = read_preferences.PRIMARY | |
| ... | |
| @contextmanager | |
| def read_preference(pref): | |
| try: | |
| prev_pref = Model.read_preference | |
| Model.read_preference = pref |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import gc | |
| from threading import Thread | |
| import boto3 | |
| import botocore | |
| def client(): | |
| boto3.Session().client("s3") | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Copies an entire mongodb collection into an RDS table, skipping existing rows. | |
| MONGOHOST="" | |
| RDS="" | |
| TABLE="" | |
| DB="cureatr" | |
| COLLECTION="" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import getpass | |
| import boto3 | |
| os.environ['AWS_ACCESS_KEY_ID'] = ... # your accounts access key | |
| os.environ['AWS_SECRET_ACCESS_KEY'] = ... # your accounts secret | |
| client = boto3.client("sts") | |
| token = getpass.getpass("Enter MFA token -> ") | |
| # Exchange permanent key/secret for temporary ones |
This is a Cheat Sheet for interacting with the Mongo Shell ( mongo on your command line). This is for MongoDB Community Edition.
Mongo Manual can help you with getting started using the Shell.
FAQ for MongoDB Fundamentals and other FAQs can be found in the side-bar after visiting that link.