Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update role permissions to allow Elastic BeanStalk Managed updates #18

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions 00-master-rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,16 @@ Parameters:
AllowedValues:
- db.t2.small
- db.t2.medium
- db.t3.small
- db.t3.medium
- db.r4.large
- db.r4.xlarge
- db.r4.2xlarge
- db.r4.4xlarge
- db.r4.8xlarge
- db.r4.16xlarge
ConstraintDescription: Must be a valid RDS instance class.
Default: db.t2.small
Default: db.t3.small
Description: The Amazon RDS database instance class (determines processing power and memory capacity of the database).
Type: String
DatabaseMasterPassword:
Expand All @@ -259,6 +261,13 @@ Parameters:
- t2.large
- t2.xlarge
- t2.2xlarge
- t3.nano
- t3.micro
- t3.small
- t3.medium
- t3.large
- t3.xlarge
- t3.2xlarge
- m3.medium
- m3.large
- m3.xlarge
Expand Down Expand Up @@ -303,7 +312,7 @@ Parameters:
- r4.8xlarge
- r4.16xlarge
ConstraintDescription: Must be a valid Amazon EC2 instance type.
Default: t2.micro
Default: t3.micro
Description: The Amazon EC2 instance type for your web instances.
Type: String
WebAsgMax:
Expand Down
3 changes: 3 additions & 0 deletions 01-rc-vpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,8 @@ Resources:
Condition:
StringEquals:
'sts:ExternalId': elasticbeanstalk
ManagedPolicyArns:
- "arn:aws:iam::aws:policy/service-role/AWSElasticBeanstalkManagedUpdatesCustomerRolePolicy"
Policies:
- PolicyName: root
PolicyDocument:
Expand Down Expand Up @@ -370,6 +372,7 @@ Resources:
- 'sts:AssumeRole'
ManagedPolicyArns:
- "arn:aws:iam::aws:policy/service-role/AmazonEC2RoleforSSM"
- "arn:aws:iam::aws:policy/service-role/AWSElasticBeanstalkManagedUpdatesCustomerRolePolicy"
Policies:
- PolicyName: root
PolicyDocument:
Expand Down
21 changes: 15 additions & 6 deletions 02-rc-elasticbeanstalk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,16 @@ Parameters:
AllowedValues:
- db.t2.small
- db.t2.medium
- db.t3.small
- db.t3.medium
- db.r4.large
- db.r4.xlarge
- db.r4.2xlarge
- db.r4.4xlarge
- db.r4.8xlarge
- db.r4.16xlarge
ConstraintDescription: Must be a valid RDS instance class.
Default: db.t2.small
Default: db.t3.small
Description: The Amazon RDS database instance class.
Type: String
WebAsgMax:
Expand All @@ -89,7 +91,14 @@ Parameters:
- t2.medium
- t2.large
- t2.xlarge
- t2.2xlarge
- t2.2xlarge
- t3.nano
- t3.micro
- t3.small
- t3.medium
- t3.large
- t3.xlarge
- t3.2xlarge
- m3.medium
- m3.large
- m3.xlarge
Expand Down Expand Up @@ -134,7 +143,7 @@ Parameters:
- r4.8xlarge
- r4.16xlarge
ConstraintDescription: Must be a valid Amazon EC2 instance type.
Default: t2.micro
Default: t3.micro
Description: The Amazon EC2 instance type for your web instances.
Type: String
PHPVersion:
Expand Down Expand Up @@ -807,9 +816,9 @@ Resources:
sed -i "s/upload_max_filesize = 2M/upload_max_filesize = 32M/" /etc/php.ini
sed -i "s/post_max_size = 8M/post_max_size = 32M/" /etc/php.ini

if [ ${Protocol} == 'https://' ]; then
echo "session.cookie_secure = on" >> /etc/php.ini
fi

echo "session.cookie_secure = on" >> /etc/php.ini


systemctl restart nginx
systemctl restart php-fpm
Expand Down