aws-amplify / amplify-hosting

AWS Amplify Hosting provides a Git-based workflow for deploying and hosting fullstack serverless web applications.
https://aws.amazon.com/amplify/hosting/
Apache License 2.0
455 stars 115 forks source link

Use an `AWS::CodeStarConnections::Connection` for connecting an `AWS::Amplify::App` to an external repository #2215

Open mbarneyjr opened 3 years ago

mbarneyjr commented 3 years ago

I'd like to be able to connect my Amplify Apps to GitHub via a CodeStarConnection resource, rather than passing a GitHub token secret through CloudFormation.

So when provisioning an Amplify App via CloudFormation, it could look like this:

  AmplifyApp:
    Type: AWS::Amplify::App
    Properties:
      ...
      ConnectionArn: arn:aws:codestar-connections:us-east-1:012012012012:connection/abc123
      # AccessToken: abc123
      # OauthToken: abc123

Or via the API

$ aws amplify create-app ... --connection-arn arn:aws:codestar-connections:us-east-1:012012012012:connection/abc123
bjudson1 commented 2 years ago

yes this is needed! an automatic connection between the status of the amplify app deployment and github checks

dnalbach commented 2 years ago

Agreed, would like to see CodeStarConnection available for Amplify so existing enterprise connections to external providers can be reused.

bsnyder74 commented 1 year ago

I need this as well. Any update on when this capability will ever be made available?

Franklin08 commented 6 months ago

Yes, I need this feature as well, any idea when this will be made available?

waynet-ihm commented 3 months ago

am I missing a trick here? seems logical to me that this would be the preferred way to connect and it still is missing. Can someone from AWS give us an answer why it is still not a feature and or when it may become one. Going through the console doesn't ask for tokens, it installs Apps.

..... 5000 minutes later ....

ok, so some digging got me here Deep in the docs

Seems the PAT is required to install the GitHubApp, they don't keep the PAT after installing the GitHubApp but the PAT is required if any updates are needed. One might think that maybe the PAT can be replaced with "xyz" after the initial deploy and maybe unless some change is required forcing the CF to do an update, we don't need a real PAT.

It would just be nicer if we could reference an already installed GitHubApp or CodeStarConnection negating the need for keeping PATs handy in case we push a change to the Amplify App.

Took me a few days to stumble on this - that could be made easier too.