- Newest
- Most votes
- Most comments
The 403 Forbidden error you're encountering while trying to provision an AWS Amplify app using Terraform with GitLab integration suggests there's an issue with authentication or permissions. Even though your GitLab Personal Access Token (PAT) has the relevant access scopes, there might be other factors causing this problem. Here are some steps you can take to troubleshoot and potentially resolve the issue:
-
Check token expiration: Ensure your GitLab PAT hasn't expired. If it has, generate a new one with the required scopes.
-
Verify Amplify permissions: Make sure the IAM role or user associated with your Terraform execution has the necessary permissions to create and manage Amplify resources.
-
Double-check GitLab permissions: Confirm that the GitLab account associated with the PAT has the correct access level to the repository you're trying to connect.
-
Refresh or regenerate tokens: Try refreshing your GitLab PAT or generating a new one with the same permissions.
-
Clear cached credentials: If you're using any form of credential caching, try clearing it and reauthenticating.
-
Check Amplify service status: Verify that there are no ongoing issues with the AWS Amplify service in your region.
-
Review Terraform configuration: Ensure your Terraform configuration for the aws_amplify_app resource is correct, including any required parameters for GitLab integration.
-
Examine Amplify console logs: If possible, check the Amplify console logs for more detailed error messages that might provide additional context.
-
Consider using AWS CLI: As a workaround, you could try creating the Amplify app using the AWS CLI first, and then import it into your Terraform state.
If the issue persists after trying these steps, you may need to contact AWS support for further assistance, as there could be an underlying problem with the integration between AWS Amplify and GitLab that requires their intervention.
Sources
Missing token in connection: Amplify - GitHub | AWS re:Post
error "access denied" when creating s3 with terraform | AWS re:Post