-
Notifications
You must be signed in to change notification settings - Fork 0
/
final-project-starter.yml
33 lines (32 loc) · 1.43 KB
/
final-project-starter.yml
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
32
33
Parameters:
# Paramenters are entirely optional.
# but using them will make your cloudformation templates more reusable
# use them for things that may change over time, such as instance type,
# VPCs and so on.
Resources:
# instace profile contains the IAM Role name(s) that we want to associate to our auto scaling EC2 Servers
# never give too much permissions to your EC2 instances! if they get hacked, the permissions get hacked also!
# in this example, I create a Role called UdacityS3ReadOnlyC2 and just give it a policy of S3 Read-Only Access
ProfileWithRolesForOurApp:
Type: AWS::IAM::InstanceProfile
Properties:
Roles:
- UdacityS3ReadOnlyEC2
Outputs:
# This is also optional.
# Bonus points for useful outputs!
# for example, if you create a Load Balancer
# it's nice to output the URL to it here, so that we don't have to go to the console to get it.
# Sample UserData
# When creating your Launch Configuration, you may need a UserData script
# here's one that you can use for Ubuntu Linux that will:
# Install Apache Web Server, Start it, and create an index.html that will be displayed
# when you visit the IP address of this server with your web browser
#Here it is:
#
# #!/bin/bash
# apt-get update -y
# apt-get install apache2 -y
# systemctl start apache2.service
# cd /var/www/html
# echo "Udacity Demo Web Server Up and Running!" > index.html