: Students publishing their websites to Amazon S3 I want students to publish their static websites to Amazon S3. But I can't have them all create AWS accounts because it requires their credit
I want students to publish their static websites to Amazon S3. But I can't have them all create AWS accounts because it requires their credit cards even for the free usage tier. I don't mind letting them use an account I setup (I'm happy to pay amazon's fees for usage too), but I need to give students their own directory and credentials to upload files. Is this possible with Amazon S3?
More posts by @Ann8826881
3 Comments
Sorted by latest first Latest Oldest Best
Amazon IAM ( aws.amazon.com/iam/ ) service gives you the ability to create accounts for students with separate password/credentials and with access to only specified AWS resources.
You can create one account for all students there, or create a group called "Students" and assign all your students to that group.
After doing that you need to specify an access policy that permits them to upload files on specified bucket on S3.
Example of such policy can look like this:
{
"Statement": [
{
"Effect": "Allow",
"Action": "s3:ListAllMyBuckets",
"Resource": "arn:aws:s3:::*"
},
{
"Effect": "Allow",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::bucket-name",
"arn:aws:s3:::bucket-name/*"
]
}]}
This policy will allow users to list all buckets and upload/delete files only in bucket called "bucket-name".
you should use Amazon IAM service aws.amazon.com/iam it will allow you to create subaccounts for your students and they will be able to publish they website the same way as you publish with your main account
If you're running linux, I wrote a script that does exactly this. It creates a web directory (chrooted) for a student and outputs their random password, and it also creates a MySQL account if you have that installed.
The username also becomes their subdomain. (sftp://johnny:randompass@server --> johnny.webclass.com --> /var/www/usr_data/johnny/www/ --> johnny@localhost for MySQL) all using the same password.
If you are using linux, I'd be more than happy to send you a copy of the script. Or, if other people request it, I'll post the source. (It is written in Perl and requires Apache).
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.