본문 바로가기
개발

마크다운 테스트하기 - 티스토리 마크다운으로 작성해보기

by Sou1 2021. 1. 23.
반응형

지금은 테스트입니다. (#)

헤더를 두개 넣어봅니다. (##)

세개도 넣어봅니다. (###)

헤더는 어느정도 잘 되는 것 같습니다.


저는 가장 중요한게 테이블입니다.

Table Description 1 Description 2 Description 3 Description 4 Description 5
1 설명1 설명2 설명3 설명4 설명5
2 설명1 설명2 설명3 설명4 설명5
3 설명1 설명2 설명3 설명4 설명5
4 설명1 설명2 설명3 설명4 설명5
5 설명1 설명2 설명3 설명4 설명5

표를 CTRL + C / CTRL + V 로 옮기는 것 또한 어느정도 잘 되는 것 같습니다.

솔직히 여기까지만 테스트하면 되었지만,
조금 더 테스트하기로 합니다.

얼마전에 코딩한 AWS IAM Assume Role을 코드로 작성해봅니다.

import boto3

# The calls to AWS STS AssumeRole must be signed with the access key ID
# and secret access key of an existing IAM user or by using existing temporary 
# credentials such as those from another role. (You cannot call AssumeRole 
# with the access key for the root account.) The credentials can be in 
# environment variables or in a configuration file and will be discovered 
# automatically by the boto3.client() function. For more information, see the 
# Python SDK documentation: 
# http://boto3.readthedocs.io/en/latest/reference/services/sts.html#client

# create an STS client object that represents a live connection to the 
# STS service
sts_client = boto3.client('sts')

# Call the assume_role method of the STSConnection object and pass the role
# ARN and a role session name.
assumed_role_object=sts_client.assume_role(
    RoleArn="arn:aws:iam::account-of-role-to-assume:role/name-of-role",
    RoleSessionName="AssumeRoleSession1"
)

# From the response that contains the assumed role, get the temporary 
# credentials that can be used to make subsequent API calls
credentials=assumed_role_object['Credentials']

# Use the temporary credentials that AssumeRole returns to make a 
# connection to Amazon S3  
s3_resource=boto3.resource(
    's3',
    aws_access_key_id=credentials['AccessKeyId'],
    aws_secret_access_key=credentials['SecretAccessKey'],
    aws_session_token=credentials['SessionToken'],
)

# Use the Amazon S3 resource object that is now configured with the 
# credentials to access your S3 buckets. 
for bucket in s3_resource.buckets.all():
    print(bucket.name)

이것도 어느정도 잘 되는 것 같습니다.

추가적으로 ppt, word로도 ctrl+c, ctrl+v 가 잘 되는지 확인해 봅니다.



이정도 기능만 써서, 자동화보고서를 마크다운으로 출력하면
여러 방면으로 사용이 가능할 것 같습니다.

굳이 ctrl+c , ctrl+v 가 아니어도, 몇몇 라이브러리를 사용하면 html, pdf로 변환도 시켜주는 것 같아
좋은 언어인 것 같습니다.

표를 만들 때
"|"만 있으면 된다니
가장 좋은 부분인 것 같습니다.

만약 "|"를 놓치고 입력안한다면?
아래처럼 합쳐지내요. 추가되는것은 생략됩니다.

Table Description 1 Description 2 Description 3 Description 4 Description 5
1 설명1 설명2 설명3 설명4 설명5
2 설명1 설명2 설명3 설명4 설명5
3 설명1 설명2 설명3 설명4 설명5
4 설명1 설명2 설명3 설명4 설명5
5 설명1 설명2 설명3 설명4 설명5

그럼 이만~

반응형