ScreenshotNeo

BlogHow-to

How to Fix Reg-suit S3 Access Denied on AWS in India

Diagnose Reg-suit S3 403 errors by checking the CI identity, failed S3 action, IAM resources, bucket controls, encryption, and region.

By the ScreenshotNeo team4 October 20267 min read

A Reg-suit S3 AccessDenied error means an AWS request made by the S3 publisher was denied. The right fix depends on which operation failed, which identity the CI job used, and which S3, KMS, or account controls apply. There is no documented India-specific fix: check the bucket’s actual region and the configured client region, but do not assume that running the job in India caused the denial.

Reg-suit’s S3 publisher reads earlier visual-test snapshots and publishes current snapshots and comparison reports. Start by identifying whether the denied request was a read, upload, delete, ACL operation, or list. Then trace that exact request through the effective identity and applicable policy layers.

1. Identify the failed S3 operation

Save the complete error text and note the CI job, time, bucket, object key if present, and request context. Determine whether the failure happened while Reg-suit fetched an expected snapshot, uploaded a current snapshot or report, deleted an object, or listed the bucket. These operations need different permissions.

The S3 publisher plugin documents these actions as its IAM permission starting point:

  • s3:GetObject and s3:GetObjectAcl for object reads and ACL reads.
  • s3:PutObject and s3:PutObjectAcl for uploads and ACL writes.
  • s3:DeleteObject for deletion.
  • s3:ListBucket for listing keys in the bucket.

Match the failed operation to the action it requires and to the behavior of the plugin version installed in the project. Do not add every action automatically if the workflow does not need it.

2. Check which identity the CI job actually uses

A policy can look correct while the job runs as a different IAM user or role than expected. Check the credential source available to the CI process and verify the values passed to Reg-suit. The Reg-suit configuration supports environment-value substitution, so inspect the resolved runtime configuration rather than only the checked-in template.

  1. Identify how the job obtains AWS credentials, such as its configured role or credentials provider.
  2. Confirm that the credential and configuration variables are present in the job environment and refer to the intended account and role.
  3. Review the CI job’s effective identity using your approved AWS identity-verification process.
  4. Compare that identity with the principal named in the policies you are reviewing.

A local command that succeeds under a developer’s credentials does not prove that CI has the same identity or permissions. Avoid printing secret access keys or session tokens into job logs while debugging.

3. Match the permission to the resource ARN

S3 bucket operations and object operations use different resource scopes. A policy that grants an object action on the bucket ARN, or a bucket action only on object ARNs, may not authorize the request. Use the actual bucket and, for object operations, the relevant key prefix when scoping access.

Operation type Plugin action to check Resource scope to verify
List keys s3:ListBucket The bucket resource
Read an object or its ACL s3:GetObject, s3:GetObjectAcl The relevant object resource or prefix
Upload an object or set its ACL s3:PutObject, s3:PutObjectAcl The relevant object resource or prefix
Delete an object s3:DeleteObject The relevant object resource or prefix

Grant only the action the failed step needs, on the bucket or object path the workflow uses. For cross-account access, check both sides: the caller’s permissions and the bucket policy must allow the intended access where applicable.

4. Review all policy layers for an explicit deny

An absent applicable Allow can produce an implicit denial. An applicable explicit Deny overrides an Allow. Check the identity policy, bucket policy, permissions boundary, role session policy, and AWS Organizations controls that apply to the principal or resource. For cross-account access, pay particular attention to the bucket policy and account ownership.

Also inspect controls tied to the request path and bucket configuration. Depending on the failed operation, a VPC endpoint policy, access point configuration, or other S3 access control can affect the result. Remove or change a Deny only when you have identified why it applies and confirmed the intended security boundary.

5. Check encryption and bucket controls

If the bucket uses server-side encryption with AWS KMS, verify the permissions required by the specific read or write operation on the KMS key as well as the S3 permissions. The KMS key policy and the caller’s effective permissions can both matter.

Check other bucket controls when they match the failure: Object Lock settings, encryption requirements in a bucket policy, access point policies, or a VPC endpoint policy. A generic S3 403 does not identify which of these is responsible; correlate the error and request with the configuration in use.

6. Verify the bucket region and Reg-suit configuration

Find the bucket’s actual AWS region and compare it with the region configured in the S3 client. Reg-suit’s S3 publisher supports optional SDK client settings through sdkOptions; inspect them if the project sets that option. Confirm the bucket name and any environment-substituted configuration values are the intended ones.

The reviewed Reg-suit and AWS material does not document an India-specific Access Denied cause. The job’s location may be relevant to your network path or endpoint setup, but geography alone is not a diagnosis. Check the actual region, client configuration, identity, and request path.

7. Retest narrowly and preserve evidence

  1. Make the smallest policy or configuration change that addresses the identified denial.
  2. Rerun the same CI workflow and confirm that the previously failing operation succeeds.
  3. Check that the workflow can still perform the reads, writes, listing, or deletion it needs, without granting unrelated access.
  4. If it still fails, save the new error details and request ID, then inspect the remaining policy and S3 control layers. AWS recommends contacting AWS Support if its S3 403 troubleshooting does not resolve the issue.

Do not make the bucket public to work around a private CI identity. S3 resources are private by default; configure access for the intended principal using narrowly scoped permissions.

Common causes and fixes

Symptom or cause What to check Fix direction
Reads work locally but fail in CI The CI job’s effective credentials and role Grant the required access to the identity CI actually uses; correct the credential source if it is unintended.
Listing fails while object reads work s3:ListBucket and its bucket resource scope Allow listing on the bucket if the workflow needs it.
One object prefix fails Object ARN or prefix scope and bucket policy conditions Align the object permission with the keys Reg-suit reads or writes.
An Allow exists but the request is denied Explicit Deny, permissions boundary, session policy, or Organizations policy Identify the applicable restrictive layer and adjust it only if the access is intended.
Upload or read fails for a KMS-encrypted bucket KMS key permissions and key policy, in addition to S3 access Authorize the required operation for the caller on the configured key.
Only requests through a particular network path fail VPC endpoint policy or access point configuration Check whether the path’s policy permits the operation and resource.
Configuration works in one environment but not another Resolved bucket name, sdkOptions, environment substitutions, and region Correct the runtime values and client configuration for the target bucket.

Performance, reliability, and cost considerations

Keep diagnosis operation-specific: repeatedly rerunning the complete visual suite can obscure which request failed. Where practical, reproduce the failing read or write in the same CI identity and configuration, then rerun the full workflow after fixing it. This is a troubleshooting approach, not a guarantee that every plugin version exposes an isolated operation.

For reliability, keep CI credentials and Reg-suit’s resolved bucket configuration consistent across runs, and avoid broad policy changes that make it harder to understand which principal has access. For AWS charges or request pricing, consult the current AWS pricing and account terms; the reviewed material provides no cost or performance benchmark for this failure mode.

Or skip the browser setup

If the task alongside visual regression work is capturing a website screenshot, ScreenshotNeo is a website screenshot API and MCP server. Its one-call request returns an image or PDF, so you do not need to configure a browser for that capture:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. It removes cookie and consent banners, newsletter popups, and chat widgets before capture. Bot checks, blank pages, and failed loads are never billed. An MCP server lets AI agents use screenshot tools. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for free and get 1,000 screenshots a month with no card.

FAQ

Does “in India” mean AWS blocks the request?

The reviewed sources do not establish that. Diagnose the actual request, identity, policy, region, and network path rather than treating location as the cause.

Should I grant all six documented S3 actions?

Use the plugin’s list as a starting point, then grant only the actions required by the failed operation and your workflow.

Is a 403 enough to tell whether IAM or the bucket policy is wrong?

No. A 403 is the symptom. The effective principal, resource scope, explicit denies, and other applicable controls determine the cause.

Sources