project(13)
-
S3에 CloudFront 배포
CloudFront 배포 생성 S3 정책 수정 django setting.py 수정 AWS_S3_CUSTOM_DOMAIN = "d2fvw83fgejypr.cloudfront.net" CloudFront의 주소를 위와 같이 입력 크롬에서 웹페이지 접속 시간 측정법 이후 웹페이지를 띄우면 웹페이지를 띄우는데 걸린 시간을 확인 가능하다. CloudFront 배포 후 시간 비교
2023.12.08 -
S3와 django 연동
참고 사이트 https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html Amazon S3 — django-storages 1.14.2 documentation Amazon S3 This backend implements the Django File Storage API for Amazon Web Services’s (AWS) Simple Storage Service (S3). Installation The backend is based on the boto3 library which must be installed; the minimum required version is 1.4.4 although we a django-storage..
2023.12.07 -
면접 참고 자료
보호되어 있는 글입니다.
2023.12.06 -
CSRF 검증
참고 사이트 Origin checking failed with SSL (https) - Using Django / Forms & APIs - Django Forum (djangoproject.com) Origin checking failed with SSL (https) Yes you are correct, I have those in my settings.py forum.djangoproject.com 문제 화면 django 서버에서 setting.py 수정 ALLOWED_HOSTS= ["mysite.com"] CSRF_TRUSTED_ORIGINS= ["https://mysite.com"] CSRF_ALLOWED_ORIGINS= ["https://mysite.com"] CORS_ORIGINS_WHITE..
2023.12.06 -
Elasticache Redis
Elasticache Redis 생성 django 서버에서 settings.py 수정 # Elasticache CACHES = { 'default': { 'BACKEND': 'redis_cache.RedisCache', 'LOCATION': 'test-cluster.g7xfld.ng.0001.apn2.cache.amazonaws.com:6379', } } Redis 생성 후 Primary endpoint의 주소를 LOCATION에 입력한다. 결과 화면 ELB를 사용하면서 로그인이 유지되지 않아 웹서비스에 어려움이 있었지만 Redis를 통해 로그인 유지가 가능했다!
2023.12.06 -
오토 스케일링
준비 사항 # advanced 설정에서 아래와 같이 userdata를 넣자. DBURL은 Google Cloud에 있는 DB의 호스트주소를 기입해야 한다. #!/bin/bash #Set DB Connection sudo sed -i 's/'10.0.2.236'/DBURL/g' /project/aws/settings.py #Set MainPage sudo sed -i 's/Python Django2/Python Django/g' /project/templates/board_navbar.html WS Launch Template 생성 WAS Launch Template 생성 WS Auto scaling 생성 WAS Auto scaling 생성 오토 스케일링 테스트 # 테스트 하고자 하는 ec2의 cpu 사용..
2023.12.05