I am trying to create event bridge api destination with OAuth authorization.
var oAuthAuthorizationProps = new OAuthAuthorizationProps
{
AuthorizationEndpoint = "authorizationEndpoint",
ClientId = "clientId",
ClientSecret = SecretValue.UnsafePlainText("testSecret"),
HttpMethod = HttpMethod.POST,
};
And I'm using these authorization props to create connection:
Connection connection = new Connection(this, "TestConnectionName", new ConnectionProps
{
Description = "Test Connection",
ConnectionName = "TestConnectionName",
Authorization = Authorization.Oauth(oAuthAuthorizationProps)
});
This code is throwing an error when creating the connection with OAuth authorisation:
Error occurred during operation 'AWS::Events::Connection'.
(HandlerErrorCode: GeneralServiceException)
But if I change the authorisation to API key, then this is working perfectly fine. Will be really grateful for any help.