与 AWS-CDK 建立 AWS amplify 连接

Establishing AWS amplify connection with AWS-CDK

我决定使用 aws-cdk 库中的 Amplify 模块,当我想连接我的 git 存储库时通过内置方法,但我无法与我的 Azure git.

建立任何连接

我能找到的只是一段代码,可以引导您实现 GitHub / GitLab 回购。

 const amplifyApp = new amplify.App(this, "sample-react-app ", {
  sourceCodeProvider: new amplify.GitHubSourceCodeProvider({
    owner: "[Repository-Owner]",
    repository: "[Repository-Name]",
    oauthToken: cdk.SecretValue.secretsManager("[Secret-Name]", {
      jsonField: "[Secret-Key]",
    }),
  }),
});
const masterBranch = amplifyApp.addBranch("master");

你知道任何可以帮助我通过此服务连接我的 Azure 存储库的解决方法吗?

提前致谢!

CDK 中的 Amplify 目前不支持开箱即用的 Azure 存储库。
您可以尝试此处建议的方法:https://github.com/aws/aws-cdk/issues/12955
或者在这里提出新功能请求:https://github.com/aws/aws-cdk/issues/new/choose
或者,您可以为此存储库使用 AWS CodeCommit。您甚至可以尝试使您的 CodeCommit 存储库与您的 Azure 存储库保持同步,如下所示:Mirror code from Azure repository to aws code commit