Skip to content

Commit 04656e5

Browse files
Merge branch 'topic-release' into topic-release
2 parents 3eacdb7 + 7b55c3e commit 04656e5

41 files changed

Lines changed: 4683 additions & 2044 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 166 additions & 66 deletions
Large diffs are not rendered by default.

cft-templates/Rstudio.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,8 @@ Parameters:
2323
AllowedValues:
2424
- t2.medium
2525
- t2.large
26-
- t2.xlarge
27-
- m4.xlarge
28-
- c4.xlarge
29-
- r4.xlarge
30-
- r4.xlarge
31-
- p2.xlarge
26+
- t3.medium
27+
- t3.large
3228

3329
ConstraintDescription: Valid instance type in the t2 families
3430
Default: t2.medium
@@ -86,14 +82,10 @@ Resources:
8682
ToPort: 22
8783
IpProtocol: tcp
8884
- CidrIp: "0.0.0.0/0"
89-
FromPort: 80
90-
ToPort: 80
85+
FromPort: 443
86+
ToPort: 443
9187
IpProtocol: tcp
92-
- CidrIp: "0.0.0.0/0"
93-
FromPort: 8787
94-
ToPort: 8787
95-
IpProtocol: tcp
96-
GroupDescription: RStudio and Shiny Security Group
88+
GroupDescription: RStudio Security Group
9789

9890
RstudioEC2Instance:
9991
Type: AWS::EC2::Instance
@@ -121,11 +113,13 @@ Resources:
121113
#add user(s)
122114
sudo useradd -m -s /bin/bash ${InitialUser}
123115
sudo echo ${InitialUser}:${InitialPassword} | chpasswd
116+
#Add user to the sudo group
117+
sudo usermod -a -G wheel ${InitialUser}
124118

125119
#Download and execute bootstrap script
126120
aws s3 cp "${EnvironmentInstanceFiles}/get_bootstrap.sh" "/tmp"
127121
chmod 500 "/tmp/get_bootstrap.sh"
128-
/tmp/get_bootstrap.sh "${EnvironmentInstanceFiles}" '${S3Mounts}'
122+
/tmp/get_bootstrap.sh "${EnvironmentInstanceFiles}" '${S3Mounts}' "${InitialUser}"
129123

130124
/opt/aws/bin/cfn-signal --exit-code 0 --resource RstudioEC2Instance --region ${AWS::Region} --stack ${AWS::StackName}
131125

@@ -138,4 +132,4 @@ Outputs:
138132
InstanceId:
139133
Value: !Ref 'RstudioEC2Instance'
140134
ApplicationPort:
141-
Value: '8787'
135+
Value: '443'

0 commit comments

Comments
 (0)