Terraform can also store modules in an S3 bucket. To access the bucket you must have appropriate AWS credentials in your configuration or available via shared credentials or environment variables.
There are a variety of S3 bucket addressing schemes, most are documented in the S3 configuration. Here are a couple of examples: