<@U088WCP3B4P> I want to host my Elementary report...
# ask-elementary-ai
m
@kapa.ai I want to host my Elementary report as a website in S3 but I do not want the bucket to be public, how can I configure it to be accesible only to people in the AWS account where the bucket is located?
k
A message from kapa.ai
To host your Elementary report on S3 without making the bucket public while still allowing access to people within your AWS account, you have a few options. Based on the knowledge sources, when hosting the Elementary report on S3, the website is typically only available if the bucket is set to public. However, there is a way to restrict access for internal use only. One recommended solution comes from a Slack conversation where a user had the same concern. The Elementary support team suggested following the approach outlined in a Stack Overflow post about hosting a static website on AWS S3 without giving public access [Slack conversation](https://slack.com/archives/C02CTC89LAX/p1700399946795189). This approach likely involves: 1. Setting up CloudFront distribution in front of your S3 bucket 2. Configuring an Origin Access Identity (OAI) or Origin Access Control (OAC) to restrict S3 access to only CloudFront 3. Using AWS IAM policies to control who can access the CloudFront distribution Another user in the community mentioned they "decided to limit the access to our buckets and access the report through the GCS UI" [Community solution](https://slack.com/archives/C02CTC89LAX/p1681822700993879), which suggests you could also simply access the HTML file directly through the S3 console rather than hosting it as a website. For hosting the report on S3, you would still use the standard Elementary command:
Copy code
edr send-report --aws-profile-name <AWS_PROFILE> --s3-bucket-name <BUCKET_NAME>
Or with explicit credentials:
Copy code
edr send-report --aws-access-key-id <ACCESS_KEY_ID> --aws-secret-access-key <SECRET_ACCESS_KEY> --s3-bucket-name <BUCKET_NAME>
Then apply the appropriate access controls to the S3 bucket to restrict it to your AWS account users.