Title: How to reconnect CodeDeploy to GitHub
Tags: amazon-web-services;github;oauth;aws-code-deploy
Question: I went through my first attempt at using CodeDeploy on AWS and did authorize CodeDeploy to access my GitHub account, but later decided that I did not want to give this admin level access since I am administrator for multiple organizations and this just felt very wrong to me.
So I revoked the OAuth derrickphelps@example.net.
Now I realize that I don't have any other good options and pretty much have to use CodeDeploy but the GitHub integration is now broken.
I tried deleting all of my CodeDeploy applications and starting over, but now whenever I click on the "Connect to GitHub" buttons in CodeDeploy it displays an error message "Token name is missing".
Is there any way to re-establish the OAuth token?


Here is another answer: You can try and follow the steps described in that thread:
The codedeploy-agent uses the OAuth token, generated by the (Re)Connect with GitHub step, to enable it to download the deployment bundle from your GitHub repo. GitHub responds with a 404 Not Found if the token is missing, has no access, or the repo does not exist. The OAuth token is set up separately for each CodeDeploy application. The OAuth token may not have been set up for the CodeDeploy application, it may have been revoked, or the repo may have been deleted in GitHub.
Please ensure the repo exists in GitHub, and please try to '(Re)Connect with GitHub' to establish a new OAuth token for the CodeDeploy application:
GitHub Behaviors with AWS CodeDeploy
Create a Deployment with AWS CodeDeploy
Also, see the blog for automating AWS CodeDeploy deployment from GitHub for more information.
Note: that last blog mentions:
This post has been updated on October 1, 2018 to reflect the deprecation of GitHub services. You can learn more about this deprecation here.
We now recommend setting up automatic deployments from GitHub using AWS CodePipeline and AWS CodeDeploy.

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2018:00:09/30/18', 'FavoriteCount': 1.0, 'PostTypeId': 1, 'Tags': '<amazon-web-services><github><oauth><aws-code-deploy>', 'Title': 'How to reconnect CodeDeploy to GitHub', 'ViewCount': 622, 'id': 52582794, 'user_AboutMe': '<p>BY DAY: Very hands on architect and coder, mostly in Node.js plus all the usual web technologies.</p>\n<p>BY NIGHT: Open source developer currently working on an open architecture for OWIN middleware.</p>\n', 'user_AccountId': 3387473.0, 'user_DisplayName': 'bikeman868', 'user_Reputation': 1881.0, 'user_Views': 196.0, 'user_id': 2843151.0}}