AWS Sync S3 Bucket error on Server-side encryption setting - amazon-web-services

I have two s3 bucket: S3 (A) on my AWS Account(A) and S3(B) on my AWS Account(B). I was able to successfully export/copy my S3(A) to S3(B).
But when I checked the objects on the S3(B), it has error on the "Server-side encryption settings"
But on my S3(A) there is no server encryption .
I just run the command on my aws cli like this
aws s3 sync s3://bucket-a s3://bucket-b

Related

How to upload local system files in my Linux server to Amazon S3 Bucket using ssh?

I am trying to upload a file which I have on my Linux server onto my AWS S3 bucket. Can anyone please advise on how to do so as I only find documentations which is related to upload the files to EC2 instead.
I do have the .pem certificate present on my server directory.
I tried to run the following command but it doesn't solve the issue
scp -i My_PEM_FILE.pem "MY_FILE_TO_BE_UPLOADED.txt" MY_USER#S3-INSTANCE.IP.ADDRESS.0.compute.amazonaws.com
It is not possible to upload to Amazon S3 by using SSH.
The easiest way to upload from anywhere to an Amazon S3 bucket is to use the AWS Command-Line Interface (CLI):
aws s3 cp MY_FILE_TO_BE_UPLOADED.txt s3://my-bucket/
This will require an Access Key and a Secret Key to be stored via the aws configure command. You can obtain these keys from your IAM User in the IAM management console (Security Credentials tab).
See: aws s3 cp — AWS CLI Command Reference

How to download from requester payer aws s3 bucket?

How can I go about downloading from this s3 bucket:
aws s3 cp --request-payer requester s3://adatascientist/parler/v1/post.ndjson.zip
I am not very technically minded, do I need a particular software or programme to do this? I have already created my AWS account I am just not sure on the next steps.
The website is here for any extra information: https://parler.adatascienti.st/research
Assuming that you have installed the AWS Command-Line Interface (CLI), then:
Use aws configure and provide your Access Key and Secret Key
Use aws s3 cp --request-payer requester s3://adatascientist/parler/v1/post.ndjson.zip . to copy the file to the current local directory
There is no Data Transfer charge if you do this from an Amazon EC2 instance in the same Region. If you download to your own computer, you will be charged for Data Transfer (9c/GB).

AWS S3 cli not working with endpoint urls

I am attempting to use wasabi but the aws s3 cli seams to ignore --enpoint-url when ever I specify s3://my-wasabi-bucket
For Example
aws s3 ls --endpoint-url=https://s3.wasabisys.com --profile wasabi
Will list my wasabi buckets, but when I do
aws s3 ls --endpoint-url=https://s3.wasabisys.com --profile wasabi s3://my-bucket
Where my-bucket is a bucket that was in the list from above, I get
Could not connect to the endpoint URL: "https://s3.us-central-1.amazonaws.com/my-bucket?list-type=2&prefix=&delimiter=%2F&encoding-type=url"
Looks like I was using the wrong endpoint url, my bucket is hosted in wasabi's central-1 so I needed to use --endpoint-url=https://s3.us-central-1.wasabisys.com

Upload File to AWS S3 using Server Side Encryptions

I am new to Amazon AWS , I can upload file through AWS Command line using aws cp from local machine to S3 bucket
aws s3 cp "E:/AWS/test.txt" s3://mybucket/test.txt
Now I want to encrypt the files Server Side Encryptions, Amazon Customer Provided Key (SSE-C) and AWS-Managed Encryption Keys (SSE-KMS). Can anybody help How I can do this ?
Please take a look at the documentation.
You would add the appropriate parameter like --sse AES256 for basic server side encryption.
I have find the solution using following way for SSE-C:
to copy file from local file to S3 bucket:
aws s3 cp "e:/AWS/test.txt" s3://mybucket/test.txt --sse-c AES256 --sse-c-key B3DBCB8D7594F0A21D3D9E0EA3B75444
to download from S3 bucket
aws s3 cp s3://mybucket/test.txt "e:/AWS/test.txt"--sse-c AES256 --sse-c-key B3DBCB8D7594F0A21D3D9E0EA3B75444

aws s3 bucket encryption

i have created an S3 bucket and assigned SSE bucket policy(server side encryption with Amazon S3-managed keys ) to it via cloud formation. how to upload an object to S3 bucket via AWS cli with x-aws-server-side-encryption set on the object? An example would be much appreciated.
You don't mention what tool or SDK you are using to interact with S3. To use the AWS CLI tool to copy a file to S3 with the server-side-encryption flag set:
aws s3 cp <local path> <s3 path> --sse AES256
There are other -sse options you can use to specify other encryption keys such as KMS keys.