728x90
반응형

In the Intermediate part of the workshop, you will:

In the Advanced part of the workshop, you will:

AWS Cloud9 (CloudShell) Setup

Clone lab resources using git

git clone https://github.com/aws-samples/cfn101-workshop

Install the latest version of AWS CLI

cd cfn101-workshop/code/solutions/cloud9
chmod +x awscliv2.sh
source awscliv2.sh
aws --version
# aws-cli/2.31.34 Python/3.13.9 Linux/6.1.155-176.282.amzn2023.x86_64 exec-env/CloudShell exe/x86_64.amzn.2023

Local Development Setup

We recommend you install the AWS CloudFormation Linter . A linter 

will proactively flag basic errors in your CloudFormation templates before you deploy them.

If you are using Visual Studio Code, you should install the cfn-lint plugin.

pip install cfn-lint

Default VPC

default VPC using the Amazon VPC console

$ aws ec2 describe-vpcs --filters Name=isDefault,Values=true --query "Vpcs[].VpcId" --region us-east-1
[
    "vpc-xxxxxxxxxxxxxaa89"
]

Basics

cd cfn101-workshop/code/workspace
aws cloudformation create-stack --stack-name cfn-workshop-template-and-stack --template-body file://template-and-stack.yaml

template-and-stack.yaml file

Resources:
  S3Bucket:
    Type: AWS::S3::Bucket
    Properties:
      BucketEncryption:
        ServerSideEncryptionConfiguration:
          - ServerSideEncryptionByDefault:
              SSEAlgorithm: AES256

use the AWS CLI to create the stack - create-stack command was successfully sent, CloudFormation will return StackId

$ aws cloudformation create-stack --stack-name cfn-workshop-template-and-stack --template-body file://template-and-stack.yaml
{
    "StackId": "arn:aws:cloudformation:us-east-1:xxxxxxxx7753:stack/cfn-workshop-template-and-stack/xxxxxxxx-xxxx-xxxx-xxxx-0e672ed843db"
}

Challenge

객체가 삭제되거나 덮어쓰는 것을 방지하거나, 객체를 보관하여 이전 버전으로 복구할 수 있도록 S3 버킷에서 버전 관리를 활성화

- S3 리소스의 속성 섹션에 VersioningConfiguration 속성을 생성
- 상태를 enabled 설정
- 템플릿에서 변경된 내용을 반영하도록 스택을 업데이트

# add Properties
        VersioningConfiguration:
          Status: Enabled

스택 업데이트

$ aws cloudformation update-stack --stack-name cfn-workshop-template-and-stack --template-body file://template-and-stack.yaml
{
    "StackId": "arn:aws:cloudformation:us-east-1:xxxxxxxx7753:stack/cfn-workshop-template-and-stack/xxxxxxxx-xxxx-xxxx-xxxx-0e672ed843db"
}

 

 

728x90
728x90

'Networking > AWS' 카테고리의 다른 글

Enable AWS Control Tower  (0) 2026.02.10
AWS certificate  (0) 2025.11.03
[AWS] Route53 S2S VPN  (0) 2025.10.29
[AWS] Route53 query logging  (1) 2025.08.07
[AWS] ALB listener server response header on|off  (0) 2025.05.19
728x90
반응형

How can users access AWS?

three options: AWS Management Console, Command Line Interface(CLI), Software Developer Kit(SDK)

don't share your access keys

What's the AWS CLI?

AWS 서비스들과 상호작용할 수 있도록 도와주는 도구 (e.g., aws s3 cp)

What's the AWS SDK?

프로그래밍을 위한 액세스가 가능하도록 하는 것, 코딩을 통해 애플리케이션 내 자체적으로 지원, 프로그래밍 언어

 

search > aws cli install macos

aws --version

aws-cli/2.16.10 Python/3.11.8 Darwin/23.5.0 exe/x86_64

 

IAM > Users > (account) > Create access key

region: ap-northeast-2

aws iam list-users

 

AWS에 액세스하기 위해서는 관리 콘솔을 사용하거나 액세스 키와 비밀 액세스 키를 구성하여 CLI을 구성할 수 있다.

 

AWS CloudShell는 다음의 AWS 리전에서 사용할 수 있다.

  • US East (Ohio)
  • US East (N. Virginia)
  • US West (N. California)
  • US West (Oregon)
  • Asia Pacific (Mumbai)
  • Asia Pacific (Osaka)
  • Asia Pacific (Seoul)
  • Asia Pacific (Sydney)
  • Asia Pacific (Singapore)
  • Asia Pacific (Tokyo)
  • Canada (Central)
  • Europe (Frankfurt)
  • Europe (Ireland)
  • Europe (London)
  • Europe (Paris)
  • Europe (Stockholm)
  • South America (São Paulo)

CloudShell: AWS 클라우드에서 무료로 사용 가능한 터미널

IAM Roles for Services

EC2 인스턴스: 가상 서버, AWS에서 어떤 작업을 수행하려고 할 때 권한을 부여하기 위해 IAM Role을 만들어 이들을 하나의 개체로 만든다. EC2 인스턴스가 AWS에 있는 어떤 정보에 접근(액세스)하려고 할 때 IAM Role을 사용한다.

Common roles: EC2 instance roles, Lambda function roles, roles for CloudFormation

IAM Security Tools

IAM Credentials Reports (account-level)
IAM Accesss Advisor (user-level)

IAM Guidelines &  Best Practices

one physical user = one AWS user

never share IAM users & access keys

IAM Section - Summary

Users, Group, Policies, Roles, Security, AWS CLI, AWS SDK, Access Keys, Audit

 

-

[Quiz#01]

IAM 사용자 그룹은 다른 사용자 그룹에 속할 수 없다. IAM 사용자만을 포함할 수 있다.

IAM 정책의 문장은 시드, 효과, 원칙, 조치, 리소스, 조건으로 구성된다. (버전은 IAM 정책 자체의 일부이며, 문장의 일부가 아니다.)

 

References

Udemy, Ultimate AWS Certified Solutions Architect Associate SAA-C03

 

728x90
728x90

'Networking > AWS' 카테고리의 다른 글

[AWS] SAA-C03#06: EC2 instance storage  (0) 2024.06.21
[AWS] SAA-C03#05: EC2 - solution architect associate level  (0) 2024.06.19
[AWS] SAA-C03#04: EC2  (0) 2024.06.18
[AWS] SAA-C03#02: IAM  (0) 2024.06.17
[AWS] SAA-C03#01: basic  (0) 2024.06.14

+ Recent posts