Skip to content

Unable to create object in Outposts3 bucket using access point

0

Hi Team,

I am trying to create an object in outpostss3 bucket using aws cli command but getting connection closed error. I have given the required permissions to bucket and accesspoint. Below is the command which i am running for creating object in s3 bucket using accesspoints

aws s3api put-object --bucket arn:aws:s3-outposts:us-west-2:593793065716:outpost/op-06d594d204174c310/accesspoint/a207804-ci-outpost-bucket1-access-point --key example-object.txt --body /home/ratnakumarch/AWS_CDK/confirmation-devops-outpost-IaC/3rdpartylicenses.txt --profile 593793065716_AWSAdministratorAccess --region us-west-2

Connection was closed before we received a valid response from endpoint URL: "https://a207804-ci-outpost-bucket1-access-point-593793065716.op-06d594d204174c310.s3-outposts.us-west-2.amazonaws.com/example-object.txt". Please find the same below

accesspoint policy { "Version": "2012-10-17", "Id": "ExampleAccessPointPolicy", "Statement": [ { "Sid": "statement1", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::593793065716:role/aws-service-role/s3-outposts.amazonaws.com/AWSServiceRoleForS3OnOutposts" }, "Action": "s3-outposts:*", "Resource": "arn:aws:s3-outposts:us-west-2:593793065716:outpost/op-06d594d204174c310/accesspoint/a207804-ci-outpost-bucket1-access-point" } ] }

bucket policy: { "Version": "2012-10-17", "Id": "ExampleBucketPolicy2", "Statement": [ { "Sid": "statement1", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::593793065716:role/aws-service-role/s3-outposts.amazonaws.com/AWSServiceRoleForS3OnOutposts" }, "Action": "s3-outposts:*", "Resource": "arn:aws:s3-outposts:us-west-2:593793065716:outpost/op-06d594d204174c310/bucket/a207804-ci-outpost-bucket1" } ] }

asked 2 years ago303 views

1 Answer
1

The issue you're experiencing with creating an object in your S3 on Outposts bucket using an access point is likely related to connectivity or endpoint configuration. Here are a few points to consider:

  1. Endpoint Configuration: Ensure that you have properly set up an endpoint for your S3 on Outposts. S3 on Outposts requires a specific endpoint to route requests to access points and enable private VPC connectivity to Outpost buckets.

  2. VPC Connectivity: S3 on Outposts only supports VPC-only access points. Make sure your VPC is correctly configured to communicate with the Outpost.

  3. Service Link Connection: Verify that the service link connection between your Outpost and the home AWS Region is active. If this connection is down, you may encounter issues creating or accessing objects.

  4. IAM Permissions: While you've provided bucket and access point policies, ensure that the IAM user or role you're using to execute the AWS CLI command has the necessary permissions to perform the PutObject operation.

  5. ARN Format: Double-check that you're using the correct ARN format for S3 on Outposts access points in your command. The format should be: arn:aws:s3-outposts:region:account-id:outpost/outpost-id/accesspoint/accesspoint-name

  6. x-amz-outpost-id Header: When making requests to S3 on Outposts, you may need to include the x-amz-outpost-id header for proper request routing.

If you've verified these points and are still encountering issues, you may want to check the status of your Outpost and ensure there are no ongoing connectivity problems. Additionally, you could try creating the object directly in the bucket (without using the access point) to isolate whether the issue is specific to the access point configuration.

Sources
Working with Amazon S3 on Outposts endpoints - Amazon S3 on Outposts
Working with S3 on Outposts buckets - Amazon S3 on Outposts

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.