Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
Hi, Cloudfront allows 10 CNAMES per distribution, and 100 distributions per account, but I haven't found a way to create multiple distributions from the same S3 bucket with s3cmd. Is this possible in general and, if so, is it possible with s3cmd? Thanks a lot.
use -cf-add-cname=… with "s3cmd cfcreate" or "s3cmd cfmodify" commands. That way you can add cnames to existing distributions.
Thanks, but I'm asking about adding a second distribution to an S3 bucket. Adding CNAMES works fine, but trying to add another distribution off the same bucket give this error:
./s3cmd cfcreate s3://my-bucket
ERROR: S3 error: 409 (DistributionAlreadyExists): The caller reference you are attempting to create the distribution with is associated with another distribution.
Hi, I don't think it's possible at all. The DistributionAlreadyExists error is returned from Amazon, not made up by s3cmd.
Why would you like to have two distributions for a single bucket? What would be the advantages against having multiple cnames for a single distro?
I think it's possible because I just spoke with Amazon support and they said it was. It's also possible to do it through the AWS Console web interface.
The reason for multiple distributions is a work-around for CF's slow cache refresh. Occasionally we need to push out a change and have it happen fairly quickly. To do this, we'll lower the DNS TTL on the CNAME, then point the CNAME at a new distribution, and voila, no stale cache (at least on the CF side). Having these distributions come from the same bucket would make things much simpler.
Did they give you any specific instructions on how to do that? Clearly the "standard" way leads to the DistributionAlreadyExists error.
Nope, other than using the web console. Maybe it's one of those things that only works REST or SOAP but not the other API.