English 中文(简体)
我试图利用AWS YunFront确保我的网站安全,但我不能改变S3的Bucket政策。
原标题:I try to make my website secure using AWS CloudFront, but I cannot change Bucket policy of S3

为了保障我的网站的安全(当我访问我的网站时,我在左上角说“不安全”,我做了以下发言。

  1. create ACM certification and verify using Route 53
  2. create Cloudfront with this certification
  3. Create original access in Cloudfront
  4. Give permission to my S3 to be accessed by CloudFront by changing bucket policy.

第4步行没有发生以下错误:

Unknown Error
An unexpected error occurred.
API response
Invalid principal in policy

我的卑鄙政策就是这样。

{
    "Version": "2012-10-17",
    "Id": "PolicyForCloudFrontPrivateContent",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E3BVR0DQ0EMFFZ"
            },
            "Action": [
                "s3:GetObject"
            ],
            "Resource": "arn:aws:s3:::songms.com/*"
        }
    ]
}

当我访问我的网站时,我会去我。

403 ERROR
The request could not be satisfied.
Bad request. We can t connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

Generated by cloudfront (CloudFront)
Request ID: vmlx8bao1D8k0myKHiGBSBCnCZDcZIUBiwNS1kIMEF_99Y_Gs0ZWQQ==

我有什么错误?

I have toyed with this for several hours without any progress. All I want is to make my website "secure" and I heard that to do so I need to use cloudfront and ACM.. Please, I really appreciate your help.

问题回答

You should post your config here so people can better understand where you are missing. However, I think you haven t attached the OAI to Origin With the error of not being able to change your s3 policy, I think your user does not have the permission to do that. You can edit s3 policy yourself instead of letting cloudfront do it. If that doesn t work, ask someone else with higher permission.





相关问题
Mount windows shared drive to MWAA in bootscript

In MWAA startup script sudo yum install samba-client cifs-utils -y sudo mount.cifs //dev/test/drop /mnt/dev/test-o username=testuser,password= pwd ,domain=XX Executing above commonds giving error - ...

How to get Amazon Seller Central orders programmatically?

We have been manually been keying Amazon orders into our system and would like to automate it. However, I can t seem to figure out how to go about it. Their documentation is barely there. There is: ...

Using a CDN like Amazon S3 to control access to media

I want to use Amazon S3/CloudFront to store flash files. These files must be private as they will be accessed by members. This will be done by storing each file with a link to Amazon using a mysql ...

unable to connect to database on AWS

actually I have my website build with Joomla hosted on hostmonster but all Joomla website need a database support to run this database is on AWS configuration files need to be updated for that I ...

Using EC2 Load Balancing with Existing Wordpress Blog

I currently have a virtual dedicated server through Media Temple that I use to run several high traffic Wordpress blogs. Both tend to receive sudden StumbleUpon traffic surges that (I m assuming) ...

SSL slowness in EC2

We ve deployed our rails app to EC2. In our setup, we have two proxies on small instances behind round-robin DNS. These run nginx load balancers for a dynamically growing and shrinking farm of web ...

热门标签