Deploy to Ruby on Rails Elastic beanstalk (IAM permission change)

Overview

Deploy an application created with Ruby on Rails Use Elastic Beanstalk (EB) to build an environment in the shortest possible time. It is divided into IAM authority change, environment construction, and EB deployment. We will focus on deploying quickly, so please be aware of this if you need strict control.

table of contents

IAM authority change Environment construction EB Deployment

IAM authority change

Create user → Grant necessary authority

It is not good for security to execute with root authority, so let's create an appropriate user and assign the following authority. · AWSElasticBeanstalkFullAccess ・ AmazonRDSDataFullAccess ・ AWSCloudFormationFullAccess ・ AWSCloud9Administrator (for cloud9 users) EB includes access authority to EC2 and S3, but does not include authority to RDS, so additional authority is assigned. In addition, cloudformation may be used during management and operation after building the EB deployment environment (such as infrastructure ver management or viewing with a designer to see the overall configuration), so it may be good to allocate it in advance. If you are deploying using cloud9, let's also touch AWS Cloud9 Administrator

1.jpg

Also, later, we will install the AWS CLI (command line interface) and deploy it on the command, so let's also get the access key and secret access key at that time. 2.jpg

Click here for EB authority range

AWS CLI install method

Follow the AWS Official Guide (https://docs.aws.amazon.com/ja_jp/cli/latest/userguide/install-virtualenv.html). Just copy and paste the following in the terminal:

pip install --user virtualenv
virtualenv ~/cli-ve
source ~/cli-ve/bin/activate
pip install --upgrade awscli
aws --version
deactivate
brew install awsebcli
#Confirm that the eb command can be used
eb --version

EB command line creation and management

Enter secret key

$aws configure
AWS Access Key ID [****************225N]: #Copy the Access Key obtained from IAM
AWS Secret Access Key [****************ERNe]: #Copy the Secret Access Key obtained from IAM
Default region name [ap-northeast-1]: #OK with enter as it is
Default output format [json]: #OK with enter as it is

Now you are ready to deploy the EB. thank you for your hard work. Next time I will deploy EB.

EB Deployment

Recommended Posts

Deploy to Ruby on Rails Elastic beanstalk (IAM permission change)
Deploy to Ruby on Rails Elastic beanstalk (EB deploy)
Deploy to Ruby on Rails Elastic beanstalk (Environment construction)
Deploy to Heroku [Ruby on Rails] Beginner
[Ruby on Rails] How to change the column name
[Ruby on Rails] Change URL id to column name
[Ruby on Rails] From MySQL construction to database change
How to deploy jQuery on Rails
How to use Ruby on Rails
How to deploy Bootstrap on Rails
Deploy Rails on Docker to heroku
[Ruby on Rails] How to use CarrierWave
Preparing to introduce jQuery to Ruby on Rails
[Ruby on Rails] How to use redirect_to
[Ruby on Rails] How to use kaminari
[Ruby on Rails] Button to return to top
Change from SQLite3 to PostgreSQL in a new Ruby on Rails project
Environment construction of Ruby on Rails from 0 [Cloud9] (From Ruby version change to Rails installation)
[Ruby on Rails] How to display error messages
How to add / remove Ruby on Rails columns
Deploy a Spring Boot application on Elastic Beanstalk
[Ruby on Rails] How to install Bootstrap in Rails
[Ruby on Rails] How to use session method
[Ruby on Rails] Change the update date and creation date to your favorite notation
Deploy RAILS on EC2
Ruby on Rails Elementary
Ruby on Rails basics
Ruby On Rails Association
[Introduction] Try to create a Ruby on Rails application
Method summary to update multiple columns [Ruby on Rails]
[Ruby on Rails] How to write enum in Japanese
[Updated from time to time] Ruby on Rails Convenient methods
[Ruby On Rails] How to reset DB in Heroku
(Ruby on Rails6) How to create models and tables
Ruby on rails learning record -2020.10.03
From 0 to Ruby on Rails environment construction [macOS] (From Homebrew installation to Rails installation)
Portfolio creation Ruby on Rails
Ruby on rails learning record -2020.10.04
[Ruby on Rails] Debug (binding.pry)
Ruby on rails learning record -2020.10.05
Ruby on rails learning record -2020.10.09
Ruby on Rails config configuration
How to deploy on heroku
Ruby on Rails basic learning ①
<Dot installation> Introduction to Ruby on Rails5 Source code comparison
[Ruby on Rails] Elimination of Fat Controller-First, logic to model-
[Ruby on Rails] about has_secure_password
Ruby on rails learning record-2020.10.07 ②
From Ruby on Rails error message display to Japanese localization
How to display a graph in Ruby on Rails (LazyHighChart)
Commentary on partial! --Ruby on Rails
Ruby on rails learning record-2020.10.07 ①
Cancel Ruby on Rails migration
[Ruby on Rails] Column restrictions when saving to DB (4 representatives)
Ruby on rails learning record -2020.10.06
Apply CSS to a specific View in Ruby on Rails
Ruby on Rails validation summary
How to deploy a Rails application on AWS (article summary)
Ruby on Rails Basic Memorandum
Ruby on Rails --From environment construction to simple application development on WSL2
I want to add a browsing function with ruby on rails