Skip to content

Instantly share code, notes, and snippets.

@toracle
Created September 7, 2017 06:55
Show Gist options
  • Save toracle/a229faa24fb2ac2c963994bea0d95854 to your computer and use it in GitHub Desktop.
Save toracle/a229faa24fb2ac2c963994bea0d95854 to your computer and use it in GitHub Desktop.
tutorial-opsworksbot-set-credentials
# -*- coding: utf-8 -*-
from bothub_client.bot import BaseBot
class Bot(BaseBot):
def set_credentials(self, event, context, access_token, secret_access_token):
data = self.get_user_data()
data['credentials'] = {
'aws_access_key_id': access_token,
'aws_secret_access_key': secret_access_token,
}
self.set_user_data(data)
self.send_message('Now I can manage your Opsworks stacks.')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment