Created
September 7, 2017 06:55
-
-
Save toracle/a229faa24fb2ac2c963994bea0d95854 to your computer and use it in GitHub Desktop.
tutorial-opsworksbot-set-credentials
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
| # -*- 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