Sarmad Sabih
Full Stack Senior Software Engineer
Principal Software Engineer
Syed Sarmad Sabih
CreativeChaos
Full-Stack Software Engineer
Coding in Ruby for 6+ years
Aspiring Writer
Secure and resizable compute capacity in the cloud. Launch applications when needed without upfront commitments.
Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers.
Amazon EC2’s simple web service interface allows you to obtain and configure capacity with minimal friction. It provides you with complete control of your computing resources and lets you run on Amazon’s proven computing environment. Amazon EC2 reduces the time required to obtain and boot new server instances to minutes, allowing you to quickly scale capacity, both up and down, as your computing requirements change. Amazon EC2 changes the economics of computing by allowing you to pay only for capacity that you actually use. Amazon EC2 provides developers the tools to build failure resilient applications and isolate them from common failure scenarios.
Flexible, affordable, and highly-scalable email sending and receiving platform for businesses and developers
Amazon Simple Email Service (Amazon SES) is a cloud-based email sending service designed to help digital marketers and application developers send marketing, notification, and transactional emails. It is a reliable, cost-effective service for businesses of all sizes that use email to keep in contact with their customers.
You can use our SMTP interface or one of the AWS SDKs to integrate Amazon SES directly into your existing applications. You can also integrate the email sending capabilities of Amazon SES into the software you already use, such as ticketing systems and email clients.
Pay as you go, and pay only for what you use. There are no upfront fees, no time-consuming pricing negotiations, no fixed expenses, and no minimum charges. And, if you send from an application hosted in Amazon EC2, the first 62,000 emails you send every month are free.
If you wanna know more about AWS SES, you can refer to this article I wrote in 2016: https://www.sitepoint.com/deliver-the-mail-with-amazon-ses-and-rails/
Fully managed message queues for microservices, distributed systems, and serverless applications
Amazon Simple Queue Service (SQS) is a fully managed message queuing service that enables you to decouple and scale microservices, distributed systems, and serverless applications. SQS eliminates the complexity and overhead associated with managing and operating message oriented middleware, and empowers developers to focus on differentiating work. Using SQS, you can send, store, and receive messages between software components at any volume, without losing messages or requiring other services to be available. Get started with SQS in minutes using the AWS console, Command Line Interface or SDK of your choice, and three simple commands.
SQS offers two types of message queues. Standard queues offer maximum throughput, best-effort ordering, and at-least-once delivery. SQS FIFO queues are designed to guarantee that messages are processed exactly once, in the exact order that they are sent.
A remote server automation and deployment tool written in Ruby.
(https://capistranorb.com)
role :demo, %w{example.com example.org example.net}
task :uptime do
on roles(:demo), in: :parallel do |host|
uptime = capture(:uptime)
puts "#{host.hostname} reports: #{uptime}"
end
end
Capistrano is written in Ruby, but it can easily be used to deploy any language.
If your language or framework has special deployment requirements, Capistrano can easily be extended to support them.
group :development do
gem "capistrano3-puma"
gem "capistrano"
gem "capistrano-bundler", require: false
gem "capistrano-rvm"
gem "capistrano-rails", require: false
gem 'capistrano-shoryuken'
end
gem 'aws-sdk-sqs'
gem 'shoryuken'
Setup EC2 instance using this Sitepoint article of mine: https://www.sitepoint.com/continous-deployment-of-rails-with-semaphoreci/
upstream app {
# Path to Puma SOCK file, as defined previously
server unix:///home/ubuntu/aws_meetup_2/shared/tmp/sockets/puma.sock fail_timeout=0;
}
server {
listen 80;
server_name localhost;
root /home/ubuntu/aws_meetup_2/current/public;
try_files $uri/index.html $uri @app;
location / {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Connection '';
proxy_pass http://app;
}
location ~ ^/(assets|fonts|system)/|favicon.ico|robots.txt {
gzip_static on;
expires max;
add_header Cache-Control public;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}
Setup Capistrano: cap install
Set main ec2 server config in config/deploy/production.rb
Capfile configuration
Configure config/deploy.rb file
Note: Your EC2 servers' SSH key must be added to your Github, Bitbucket or Gitlab account. And your deployment machine's SSH key must be added in all of your EC2 instances' authorized_keys file.
News for Students =>
Get in touch...
LinkedIn: https://www.linkedin.com/in/sarmad-sabih-754b5264
Github: https://www.github.com/sarmad90
I Write At
If this talk has inspired you to take Ruby on Rails on a spin, then you should give this piece a read:
https://medium.com/@sarmadsabih/a-brief-guide-to-learning-ruby-on-rails-b5c0e32acabb
By Sarmad Sabih
Slide for AWS Karachi Meetup #2. Demonstration of Amazon Web Services like SQS, SES, S3, EC2 and RDS.