Feature: Create a CloudFront distribution @create-cf-dist Scenario: The user wants to deliver his website via CloudFront Given I answer 'yes' to 'do you want to use CloudFront' When I run the configure-s3-website command with parameters | option | value | | --config-file | features/support/sample_config_files/create_cf_dist.yml | Then the output should be """ Bucket website-via-cf now functions as a website Bucket website-via-cf is now readable to the whole world No redirects to configure for website-via-cf bucket Do you want to deliver your website via CloudFront, the CDN of Amazon? [y/N] The distribution E45H2VN49KPDU at d3feoe9t5ufu01.cloudfront.net now delivers the origin website-via-cf.s3-website-us-east-1.amazonaws.com Please allow up to 15 minutes for the distribution to initialise For more information on the distribution, see https://console.aws.amazon.com/cloudfront Added setting 'cloudfront_distribution_id: E45H2VN49KPDU' into features/support/sample_config_files/create_cf_dist.yml """ And the config file should contain the distribution id @create-cf-dist Scenario: The user wants create a CloudFront distribution with his own settings Given I answer 'yes' to 'do you want to use CloudFront' When I run the configure-s3-website command with parameters | option | value | | --config-file | features/support/sample_config_files/create_cf_dist_with_custom_configs.yml | Then the output should be """ Bucket website-via-cf now functions as a website Bucket website-via-cf is now readable to the whole world No redirects to configure for website-via-cf bucket Do you want to deliver your website via CloudFront, the CDN of Amazon? [y/N] The distribution E45H2VN49KPDU at d3feoe9t5ufu01.cloudfront.net now delivers the origin website-via-cf.s3-website-us-east-1.amazonaws.com Please allow up to 15 minutes for the distribution to initialise For more information on the distribution, see https://console.aws.amazon.com/cloudfront Added setting 'cloudfront_distribution_id: E45H2VN49KPDU' into features/support/sample_config_files/create_cf_dist_with_custom_configs.yml Applied custom distribution settings: default_cache_behavior: min_TTL: 600 default_root_object: index.json """ And the config file should contain the distribution id @create-cf-dist Scenario: The user wants to deliver his website via CloudFront and see details on the new distribution Given I answer 'yes' to 'do you want to use CloudFront' When I run the configure-s3-website command with parameters | option | value | | --config-file | features/support/sample_config_files/create_cf_dist.yml | | --verbose | | Then the output should be """ Bucket website-via-cf now functions as a website Bucket website-via-cf is now readable to the whole world No redirects to configure for website-via-cf bucket Do you want to deliver your website via CloudFront, the CDN of Amazon? [y/N] The distribution E45H2VN49KPDU at d3feoe9t5ufu01.cloudfront.net now delivers the origin website-via-cf.s3-website-us-east-1.amazonaws.com Please allow up to 15 minutes for the distribution to initialise For more information on the distribution, see https://console.aws.amazon.com/cloudfront Below is the response from the CloudFront API: E45H2VN49KPDU InProgress 2013-05-18T20:08:00.350Z 0 d3feoe9t5ufu01.cloudfront.net false 0 configure-s3-website gem 2013-05-18 23:07:56 +0300 0 index.html 1 website-via-cf-S3-origin website-via-cf.s3-website-us-east-1.amazonaws.com 80 443 match-viewer website-via-cf-S3-origin true all false 0 allow-all 86400 0 Created by the configure-s3-website gem false false PriceClass_All true Added setting 'cloudfront_distribution_id: E45H2VN49KPDU' into features/support/sample_config_files/create_cf_dist.yml """ And the config file should contain the distribution id @bucket-exists Scenario: The user already has CloudFront configured in his configuration file When I run the configure-s3-website command with parameters | option | value | | --config-file | features/support/sample_config_files/config_with_cloudfront_distribution_id.yml | Then the output should be """ Bucket name-of-an-existing-bucket now functions as a website Bucket name-of-an-existing-bucket is now readable to the whole world No redirects to configure for name-of-an-existing-bucket bucket """