Questions tagged with Amazon Simple Storage Service
Content language: English
Sort by most recent
Hi I'm trying to analyze a multipage pdf using Textract and the `start_document_analysis` API. I understand that the document I'm analyzing must be present in an S3 bucket. However when calling this function, I receive the following error message:
```
InvalidS3ObjectException: An error occurred (InvalidS3ObjectException) when calling the StartDocumentAnalysis operation: Unable to get object metadata from S3. Check object key, region and/or access permissions.
```
I've verified that the bucket name and key are correct, and the document works in the test console, leaving me to think this is related to permissions.
Here is my test script (note, I am running this from my local computer, NOT lambda):
```
import boto3
session = boto3.Session(profile_name="default")
s3 = s.client("s3")
tx = s.client("textract")
doc = "test.pdf"
bucket = "test"
s3.upload_file(doc, bucket, doc)
resp = tx.start_document_analysis(
DocumentLocation = {
"S3Object": {
"Bucket": bucket,
"Name": doc
}
},
FeatureTypes = ["TABLES"]
)
```
How do I configure my bucket to allow access from Textract?
Thanks
Hello, I store data in S3 as part of Amazon Data Exchange Products. I want to create an API product so that users can pull my data in csv or json format directly from the bucket. The bucket contains multiple csv's per day
Do I need a lambda fronting an api in api gateway which will read the contents of the file first?
Or, can I simply create an API which will parse the files and return data to the subscribers? I would then package that API up into a "data product"
Ideally the data would be pulled as json by default, but they would also be able to pull it as csv.
I will need to be able to give users the ability to structure a payload via SDK or CLI or some other IDE in which they specify various fields, date ranges etc...
Thank you.
I have 5 Terabytes of information that I want to backup in AWS deep Glacier. I hope to never download them, just wishing to archive them in the cloud besides physical disks. Is there a way to Uoload it directly from S3?
When I execute command:
aws ec2 export-image --image-id ami-04f516c --disk-image-format vmdk --s3-export-location S3Bucket=ami-export
I had a returned error:
An error occurred (InvalidParameter) when calling the ExportImage operation: Insufficient permissions - please verify bucket ownership and write permissions on the bucket. Bucket: ami-export
I couldn't change the permissions.
Can someone help me?
Hello,
I am transfering monitron sensor data from S3 bucket into a self-made app. (visualizing vibration and temperature in a different way than the monitron-app is doing)
How can store the monitron data longer - right now I can only fetch the last 24 hours.
Can I extend it to 7 days ?
Hello All,
I've been trying to setup a Multi-region access point for S3.
The basic problem is that I have users in Asia that I'm trying to get better performance for.
The simple part. I've created two buckets, I've put an html file in each of them with a simple name of us-east-1 and ap-south-1.
Initially those were private access only but for the purpose of getting anything working they are now public.
They are setup in an mrap which for now is not replicating.
I setup a cloudfront distribution and pointed it at the mrap but only ever get errors.
https://corridor-ap-south-1.s3.ap-south-1.amazonaws.com/test/region-test/region.html - ap-south-1 html
https://corridor-cdn.s3.amazonaws.com/test/region-test/region.html - us-east-1 html
mrap alias: mbzcc59bo9dy4.mrap
mrap access point? https://mbzcc59bo9dy4.mrap.accesspoint.s3-global.amazonaws.com/test/region-test/region.html
The errors are: The authorization mechanism you have provided is not supported. Please use Signature Version 4.
I hope I'm wrong, but is there a ridiculously stupid world where I have to put a signature on my object request?
This seems like it would be a complete waste of money to setup a lambda to do this for all my object requests.
I tried with below command but it is not getting the results like if applied version Id of the tag if not applied not applying the tag to s3 object
Help me to write shell script
aws s3api get-object-tagging --bucket your-bucket --key your-object-key --query 'TagSet[?Key==`retention` && Value==`10yearsretention` || Value==`6yearsretention`]' >/dev/null 2>> error.log || aws s3api put-object-tagging --bucket your-bucket --key your-object-key --tagging 'TagSet=[{Key=retention,Value=10yearsretention}]' >> error.log
The above command not working properly, put-object command is working but not both commands correctly when combined
Results I am getting like [] when trying with
aws s3api get-object-tagging --bucket your-bucket --key your-object-key --query 'TagSet[?Key==`retention` && Value==`10yearsretention` || Value==`6yearsretention`]'
I am facing issue when i am calculating size of s3 bucket . when i check from the bucket metrics , it shows 54TB , but when i calculate the total size of bucket through api/console it shows only 1 TB. we haven't enabled any versioning.
the cost is also calculate on basis of 54 TB . please help me with that.
this bucket is used for datalake operation and there are lot of read/write/deletion operation happen over the time.
I am trying to get and Amplify build to pull a file from an S3 bucket in another AWS account. Both accounts live under the same organisation. The bucket in account A has the following policy
```
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::bucket-account-a/*",
"Condition": {
"StringEquals": {
"aws:PrincipalOrgID": "o-xxxxxxxxxx"
}
}
}
]
}
```
Account B has the Amplify application with a service role attached and the following `amplify.yml`:
```
version: 1
frontend:
phases:
preBuild:
commands:
- aws s3api get-object --bucket bucket-account-a --key file.txt ./file.txt
- yarn install
build:
commands:
- yarn run build
artifacts:
baseDirectory: .next
files:
- '**/*'
cache:
paths:
- node_modules/**/*
```
The build fails outputting the following error: `An error occurred (AccessDenied) when calling the GetObject operation: Access Denied`. I have seen that the service role assigned is being assumed and refers to account B, so I am not sure what I am missing or what is stopping this from working. I have tried removing the condition on the above policy and updating the `Principal` on the S3 bucket policy to the assumed role (`arn:aws:sts::bbbbbbbbbbbb:assumed-role/staging-amplify-service-role/BuildSession`), the Amplify service, even just without the account id (`arn:aws:iam::bbbbbbbbbbbb:root`), all producing the same error.
Has anyone tried something similar?
While doing the bucket empty using below aws s3 cli, it removed the objects and now for current version is it not showing any object but when I see using version checkbox enabled it shows more object, so I need to empty other version's object as well other wise bucket deleton is not possible, please let me know hot to do it in faster way.
Cli used for emptying the bucket.
aws s3 rm s3://<bucketName>--recursive
I have also enabled the lifecycle on the bucket but does any command also needed to remove the object
Hello, my free tier is about to end and it says I have an active S3 bucket, but I've gone through everything and can't seem to find it. So I am unable to terminate it. I've already gone through the articles on how to terminate an active and other related material. I think it's because I can't access the region it was created in, but I only have this one account and can only access global when I need to access us-east-1. Any help would be awesome. Thank you.
Hi,
S3 has static website enabled and configured through cloud front using OAI.
When s3 is public accessible , the cloudfront url is working , once S3 Public access is disabled , even website is not being accessed by cloudfront url and getting access denied.