import{r as s,p as c,q as u,w as t,z as e,t as l,R as o}from"./vendor.8ed37afc.js";const d={class:"markdown-body"},h=e("p",null,"While there are many different ways to run Directus on AWS, from single EC2 instances to a full ELB load-balanced configuration, we like the following combination of services:",-1),p=e("ul",null,[e("li",null,[o("Elastic Beanstalk (EB) "),e("ul",null,[e("li",null,"Elastic Load-Balancer (ELB)"),e("li",null,"Elastic Compute Cloud (EC2)")])]),e("li",null,"CodeDeploy"),e("li",null,"Simple Storage Service (S3)"),e("li",null,"Relational Database Service (RDS) (Aurora)"),e("li",null,"CloudFront"),e("li",null,"Route 53")],-1),f=e("h2",{id:"elastic-beanstalk"},[o("Elastic Beanstalk "),e("a",{class:"header-anchor",href:"#elastic-beanstalk"},"#")],-1),_=e("p",null,"Will run Directus in an autoscaling environment with a load balancer. Makes sure the instances stay alive, and will replace individual instances in case of unexpected crashes.",-1),m=o("We recommend setting up a repo in GitHub (or another Git provider) and configuring it using "),g=o("our manual installation flow"),b=o(". This allows you to later hook up the repo to your Elastic Beanstalk instance through CodeDeploy."),y=e("p",null,[o("See "),e("a",{href:"https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs.html",target:"_blank",rel:"noopener noreferrer"},"Deploying Node.js applications to Elastic Beanstalk"),o(" for more information.")],-1),k=o("Directus\u2019 configuration is all set through environment variables. For a full overview of all available environment variables, see "),v=o("Environment Variables"),w=e("h2",{id:"codedeploy"},[o("CodeDeploy "),e("a",{class:"header-anchor",href:"#codedeploy"},"#")],-1),S=e("p",null,"Allows you to automatically deploy updates to your Directus instance or extensions to Elastic Beanstalk.",-1),D=e("p",null,[o("See "),e("a",{href:"https://aws.amazon.com/blogs/devops/automatically-deploy-from-github-using-aws-codedeploy/",target:"_blank",rel:"noopener noreferrer"},"Automatically Deploy from GitHub Using AWS CodeDeploy"),o(" for more information.")],-1),C=e("h2",{id:"simple-storage-service-(s3)"},[o("Simple Storage Service (S3) "),e("a",{class:"header-anchor",href:"#simple-storage-service-(s3)"},"#")],-1),E=e("p",null,"Ideal place to store files uploaded to Directus. Your bucket doesn\u2019t have to be publicly accessible to the web; Directus will stream files from and to the bucket in its /asset endpoint.",-1),B=e("p",null,[o("See "),e("a",{href:"https://docs.aws.amazon.com/AmazonS3/latest/gsg/CreatingABucket.html",target:"_blank",rel:"noopener noreferrer"},"Creating a bucket"),o(" for more information.")],-1),A=e("h2",{id:"relational-database-service-(rds)-(aurora)"},[o("Relational Database Service (RDS) (Aurora) "),e("a",{class:"header-anchor",href:"#relational-database-service-(rds)-(aurora)"},"#")],-1),W=e("p",null,"While you can technically use any of the SQL based databases offered in AWS, we like to use Aurora. It\u2019s auto-scaling and use-based costs have worked out pretty well for us in the past.",-1),z=e("h2",{id:"cloudfront"},[o("CloudFront "),e("a",{class:"header-anchor",href:"#cloudfront"},"#")],-1),R=e("p",null,"While it\u2019s not a technical requirement, it\u2019s not a bad idea to configure a CloudFront instance in front of your EB environment. This protects you from DDoS attacks and allows you to cache repeated calls to assets in its CDN.",-1),x=e("p",null,[o("See "),e("a",{href:"https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.cloudfront.html",target:"_blank",rel:"noopener noreferrer"},"Using Elastic Beanstalk with Amazon CloudFront"),o(" for more information.")],-1),F=e("h2",{id:"route-53"},[o("Route 53 "),e("a",{class:"header-anchor",href:"#route-53"},"#")],-1),N=e("p",null,"The last piece of this puzzle is to assign a domain name to your CloudFront instance. You can use Route 53 for this purpose.",-1),T=e("p",null,[o("See "),e("a",{href:"https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-cloudfront-distribution.html",target:"_blank",rel:"noopener noreferrer"},"Routing traffic to an Amazon CloudFront web distribution by using your domain name"),o(" for more information.")],-1),H={setup(G,{expose:r}){const a={title:"AWS",modularExtension:!1};return r({frontmatter:a}),(L,V)=>{const n=s("router-link"),i=s("DocsWrapper");return c(),u(i,{frontmatter:a},{default:t(()=>[e("div",d,[h,p,f,_,e("p",null,[m,l(n,{to:"/docs/getting-started/installation/manual"},{default:t(()=>[g]),_:1}),b]),y,e("p",null,[k,l(n,{to:"/docs/configuration/config-options"},{default:t(()=>[v]),_:1})]),w,S,D,C,E,B,A,W,z,R,x,F,N,T])]),_:1})}}};export{H as default};
