일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
- command
- AWS
- Resolver
- 임업후계자
- boto3
- 경매
- 신탁공매
- S3
- 외국납부세액공제
- 리소스
- 세금계산서
- 정책자금
- 인덱싱
- 공매
- Kubernetes
- route53
- 금융소득
- lambda
- kubectl
- 농지연금
- python
- OpenSearch
- serverless
- 산지연금
- pod
- 매입불공제
- 성능개선
- 양도소득세
- Filter
- node
- Today
- Total
목록Filter (2)
진지한 개발자
aws s3 filter 조건의 file 지우기 import boto3 sess = boto3.Session() s3 = sess.resource('s3') operation_bucket = s3.Bucket('MY_BUCKET') for prd in prd_list: file_list_to_delete = [] for file_key in operation_bucket.objects.filter(Prefix=f'MY_PREFIX/product={prd}'): # print(file) if 'some_condition' in str(file_key): file_list_to_delete.append(file_key) s3.Object('MY_BUCKET', file_key._key).delete() pr..
특정 이름을 가진 S3 파일 리스트 필터링 import boto3 s3 = boto3.resource('s3') bucket = s3.Bucket('bucket-name') for file_key in file_list: print(file_key) s3.Object('s3-an2-op-hlp-etl', file_key).delete() 필터링 된 S3 리스트 내 파일 삭제 import boto3 sess = boto3.Session() s3 = sess.resource('s3') operation_bucket = s3.Bucket('bucket-name') file_list = [] for file in operation_bucket.objects.filter(Prefix=f'test_prefix/')..