Objective: Create a new Amazon S3 Bucket named
student-management-website-2025
to store static files (index.html
,styles.css
,scripts.js
from section 5) for the Student Data Management application’s web interface. This bucket will be configured to support Static Website Hosting (section 6.3) and serve content via CloudFront (section 7), integrated with thestudent
API (stageprod
, section 4.8) to call the GET /students, POST /students, and POST /backup endpoints with API Key security (StudentApiKey
, section 4.2) and CORS (section 4.7).
student-management-website-2025
bucket:
index.html
, styles.css
, scripts.js
) for the web interface using Tailwind CSS.s3:GetObject
) in the Bucket Policy (section 6.4), which is required for CloudFront to access the content.student
API (section 4.8) using the Invoke URL (e.g., https://abc123.execute-api.us-east-1.amazonaws.com/prod
) and StudentApiKey
in the x-api-key
header.https://d12345678.cloudfront.net
).student-backup-20250706
bucket (section 2.4, 6.5), which is used to store backup files from the POST /backup endpoint.You need to complete section 2.4 (create the student-backup-20250706
bucket), section 3 (create the Lambda functions getStudentData
, insertStudentData
, BackupDynamoDBAndSendEmail
, DynamoDB table studentData
, SES email verification), section 4.1 (create the student
API), section 4.2 (create the StudentApiKey
), section 4.3 (create StudentUsagePlan
), section 4.4 (create the GET /students method), section 4.5 (create the POST /students method), section 4.6 (create the /backup
resource and POST /backup method), section 4.7 (enable CORS), section 4.8 (deploy the API to the prod
stage), section 4.9 (link the StudentApiKey
to StudentUsagePlan
and associate with the student
API in the prod
stage), and section 5 (build the web interface with index.html
, styles.css
, scripts.js
). Ensure your AWS account has permissions to access S3 (s3:CreateBucket
, s3:PutBucketPolicy
) and the AWS region is us-east-1
.
Access the AWS Management Console
student
API, Lambda functions (getStudentData
, insertStudentData
, BackupDynamoDBAndSendEmail
), DynamoDB table studentData
, student-backup-20250706
bucket, and SES. The region is displayed in the top right corner of the AWS Console.Open the Create Bucket Interface
student-management-website-2025
bucket already exists to avoid duplication.Configure the student-management-website-2025
Bucket
student-management-website-2025
.
student-management-website-20250706-abc123
).s3:GetObject
) needs to be allowed for CloudFront to serve the web interface. After configuring the Bucket Policy (section 6.4), unrelated options can be enabled again for added security.index.html
, styles.css
, scripts.js
) to recover them if errors occur while updating the interface (e.g., mistakenly uploading the wrong file).Project=StudentManagement
, Environment=Production
.Create the Bucket
student-management-website-2025
bucket should appear with a newly created status.student-management-website-20250706-<random-string>
).s3:CreateBucket
) in the IAM role.s3:CreateBucket
and s3:PutBucketPolicy
permissions.Check the Bucket
student-management-website-2025
to verify:
us-east-1
), Bucket Versioning (Enabled), Default encryption (SSE-S3).Factor | Details |
---|---|
Bucket Name | - The name student-management-website-2025 is recommended for easy identification, but it must be globally unique. If it’s already taken, add a random suffix (e.g., student-management-website-20250706-abc123 ). - Ensure it does not conflict with the backup bucket (student-backup-20250706 , section 2.4). |
Security | - Unchecking Block all public access is temporary to configure Bucket Policy (section 6.4). After configuring, unrelated options can be re-enabled for better security. - For better security, use CloudFront Origin Access Identity (OAI) instead of full public access (section 6.4). - Do not store API_KEY in static files. Use AWS Secrets Manager or CloudFront Functions to add the x-api-key header (section 5). |
AWS Region | - Ensure the region us-east-1 matches with the student-management-website-2025 bucket, student-backup-20250706 , student API, prod stage, Lambda functions (getStudentData , insertStudentData , BackupDynamoDBAndSendEmail ), DynamoDB studentData , SES, and CloudFront. |
Error Handling | - If the bucket does not appear: Refresh the page or check the AWS region. - If unable to create the bucket: Check the bucket limit in the account (default 100 buckets per region, may require AWS to increase the quota). - If encountering AccessDenied : Verify IAM role permissions for s3:CreateBucket and s3:PutBucketPolicy . |
Optimization | - Add S3 Access Logs to track access: In S3 > student-management-website-2025 > Properties > Server access logging, select Enable and specify a log bucket (e.g., student-web-logs-20250706 ). - Use AWS CLI or SDK to automate bucket creation: |
Integration Testing | - Verify that the student-management-website-2025 bucket exists in S3 > Buckets with the correct region (us-east-1 ) and Bucket Versioning (Enabled). - Prepare the index.html , styles.css , scripts.js files (section 5) to upload (section 6.2). - After completing section 6, access the interface via the CloudFront URL (e.g., https://d12345678.cloudfront.net ) and check the following functionalities: - POST /students: Save records to DynamoDB studentData and send email via SES. - GET /students: Display the student table. - POST /backup: Create backup files in student-backup-20250706 and send notification emails. |
Best Practice Tip: After creating the bucket, immediately check it in S3 > Buckets to verify the information. Use AWS CLI or SDK to automate if you need to create multiple buckets. Prepare the interface files from section 5 and verify IAM permissions before proceeding with section 6.2 (uploading files to S3).
The student-management-website-2025
bucket has been successfully created in the us-east-1
region, with Bucket Versioning and Default encryption enabled, ready for uploading interface files (section 6.2), enabling Static Website Hosting (section 6.3), and integrating with CloudFront.
Next step: Proceed to Upload the interface assets to S3 to continue configuring!