I am using the bitbucket pipeline and would like to talk to deploy on AWS via bitbucket pipeline. I am using an OIDC connection. I want to put one condition that deployment must be happening only for the "main" branch. In my IAM role I have added the following condition for the branch:
"StringEquals"
{
"api.bitbucket.org/2.0/workspaces/<workspace>/pipelines-config/identity/oidc:branchName": "main"
}
After adding this condition on AWS, the bitbucket pipeline unable to make a connection to AWS.
Any suggestion why this condition is not fulfilled on AWS IAM. Or any secure way to do that.