0
0
AWScloud~10 mins

Resources section in AWS - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define a resource in AWS CloudFormation.

AWS
Resources:
  MyBucket:
    Type: [1]
Drag options to blanks, or click blank then click option'
AAWS::S3::Bucket
BAWS::EC2::Instance
CAWS::Lambda::Function
DAWS::DynamoDB::Table
Attempts:
3 left
💡 Hint
Common Mistakes
Using EC2 instance type instead of S3 bucket type.
Confusing Lambda function type with S3 bucket.
2fill in blank
medium

Complete the code to add a property to the S3 bucket resource.

AWS
Resources:
  MyBucket:
    Type: AWS::S3::Bucket
    Properties:
      [1]:
        Status: Enabled
Drag options to blanks, or click blank then click option'
AVersioningConfiguration.Status
BVersioningConfiguration
CVersioningConfiguration.Enabled
DPublicAccessBlockConfiguration
Attempts:
3 left
💡 Hint
Common Mistakes
Using dotted notation like VersioningConfiguration.Status instead of proper nesting.
Selecting unrelated properties like PublicAccessBlockConfiguration.
3fill in blank
hard

Fix the error in the resource definition by completing the missing property key.

AWS
Resources:
  MyInstance:
    Type: AWS::EC2::Instance
    Properties:
      [1]: t2.micro
Drag options to blanks, or click blank then click option'
AType
BInstanceSize
CInstanceType
DSize
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'InstanceSize' or 'Size' which are invalid property names.
Confusing 'Type' with 'InstanceType'.
4fill in blank
hard

Fill both blanks to define an IAM role with a trust policy.

AWS
Resources:
  MyRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Principal:
              Service: [1]
            Action: [2]
Drag options to blanks, or click blank then click option'
Aec2.amazonaws.com
Bsts:AssumeRole
Clambda.amazonaws.com
Diam:PassRole
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong service principal like Lambda for EC2 role.
Using incorrect action such as 'iam:PassRole' in trust policy.
5fill in blank
hard

Fill all three blanks to define an S3 bucket policy allowing public read access.

AWS
Resources:
  PublicBucketPolicy:
    Type: AWS::S3::BucketPolicy
    Properties:
      Bucket: [1]
      PolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Principal: [2]
            Action: [3]
            Resource: arn:aws:s3:::my-public-bucket/*
Drag options to blanks, or click blank then click option'
Amy-public-bucket
B*
Cs3:GetObject
Darn:aws:s3:::my-public-bucket
Attempts:
3 left
💡 Hint
Common Mistakes
Using the bucket ARN instead of the bucket name in the Bucket property.
Using wrong action like 's3:PutObject' instead of 's3:GetObject'.