diff --git a/README.md b/README.md index 71f5a276..5dd0f25e 100644 --- a/README.md +++ b/README.md @@ -72,11 +72,13 @@ vagrant ssh ### Creating your development S3 bucket -If you added AWS credentials above, run the following commands to configure your development S3 buckets: +If you added AWS credentials above, run the following commands to configure your development S3 bucket. If you're running without Vagrant, either replace `${DEV_USER}` on the first line with the value you're using, or run `source .env` to set it in your shell. ``` -aws s3api create-bucket --bucket "${DEV_USER}-pfb-storage-us-east-1" -aws s3api put-bucket-policy --bucket "${DEV_USER}-pfb-storage-us-east-1" --policy "{\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"s3:GetObject\",\"Resource\":\"arn:aws:s3:::${DEV_USER}-pfb-storage-us-east-1/*\"}]}" +export PFB_DEV_BUCKET="${DEV_USER}-pfb-storage-us-east-1" +aws s3api create-bucket --bucket $PFB_DEV_BUCKET +aws s3api put-bucket-policy --bucket $PFB_DEV_BUCKET --policy "{\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"s3:GetObject\",\"Resource\":\"arn:aws:s3:::${PFB_DEV_BUCKET}/*\"}]}" +aws s3api put-bucket-cors --bucket $PFB_DEV_BUCKET --cors-configuration "{\"CORSRules\":[{\"AllowedHeaders\":[\"Authorization\"],\"AllowedMethods\":[\"GET\"],\"AllowedOrigins\":[\"*\"],\"ExposeHeaders\":[],\"MaxAgeSeconds\":3000}]}" ``` At this point, if you only intend to run the 'Bike Network Analysis', skip directly to [Running the Analysis](#running-the-analysis)