Hi. We are using edr send report to S3 and gets th...
# ask-elementary-ai
t
Hi. We are using edr send report to S3 and gets that html file. Now, i want to make that file as a website but I dont wanna make the S3 Bucket as public accessible. what do i have to do?
k
A message from kapa.ai
I understand you want to host the Elementary Data report as a website from your S3 bucket without making the bucket publicly accessible. Based on the knowledge sources, there are a few approaches you can consider: 1. Use CloudFront with S3: One community member mentioned they "load content from S3 into CloudFront and handle authentication there" [in this Slack thread](https://slack.com/archives/C02CTC89LAX/p1685926791208079). This allows you to keep your S3 bucket private while serving the content through CloudFront with authentication. 2. Use Signed URLs: Another option mentioned by Elementary staff is to create time-limited signed URLs that are publicly accessible but temporary, which can work with private buckets [as mentioned here](https://slack.com/archives/C02CTC89LAX/p1685926791208079). 3. Follow AWS guidance: One community member specifically asked about this same issue and was directed to a Stack Overflow solution. You can check out [this suggested solution](https://slack.com/archives/C02CTC89LAX/p1700399946795189) which discusses hosting a static website on S3 without giving public access. 4. Consider alternate hosting methods: If S3 privacy requirements are strict, you might consider other hosting options like containers as discussed by some users in the community [in this thread](https://slack.com/archives/C02CTC89LAX/p1677775771380929). For implementing the report upload itself, you would still use the standard command with the website flag:
Copy code
edr send-report --aws-profile-name <AWS_PROFILE> --s3-bucket-name <BUCKET_NAME> --update-bucket-website true
The key is to implement one of the access control methods mentioned above to serve the content securely without making the bucket itself public.
t
@Tal Nidam You can use bucket policy to restrict to the ips that you want to have access to the website. E.g "aws:SourceIp": "192.0.2.0/24"