amazon-ec2

user data scripts fails without giving reason

冷暖自知 提交于 2020-01-21 07:12:10
问题 I am starting a Amazon Linux instance (ami-fb8e9292) using the web console, pasting data into the user data box to run a script upon startup. If I use the example given by amazon to start a web server, it works. But when I run my own script (also a #!/bin/bash script), it does not get run. If I look in var/log/cloud-init.log , it gives no useful information on the topic: May 22 21:06:12 cloud-init[1286]: util.py[DEBUG]: Running command ['/var/lib/cloud/instance/scripts/part-001'] with allowed

Lambda cold start possible solution?

偶尔善良 提交于 2020-01-21 04:05:33
问题 Is scheduling a lambda function to get called every 20 mins with CloudWatch the best way to get rid of lambda cold start times? (not completely get rid of)... Will this get pricey or is there something I am missing because I have it set up right now and I think it is working. Before my cold start time would be like 10 seconds and every subsequent call would complete in like 80 ms. Now every call no matter how frequent is around 80 ms. Is this a good method until say your userbase grows, then

How do I get EC2 load balancing properly set up to allow for real time file syncing?

筅森魡賤 提交于 2020-01-21 00:42:54
问题 I'm new to EC2. I have read a lot about it, watched many videos and tutorial and pretty much familiar with how everything work. I still have few question that I can't seem to find direct answers to. If I have 3 instances (linux) with load balancing all serving the same site and the site is a dynamic php/mysql driven where users post files forum threads every second, how is the database and files synced to all 3 instances in real time. Do I need to have the database on RDS where every instance

Unable to export ec2 instance to S3

爱⌒轻易说出口 提交于 2020-01-20 09:12:05
问题 I am trying to export an EC2 instance (instance created with AMI which was imported earlier using VM import export service) to S3 bucket which is constantly failing . I also tried changing the bucket access to public still the error continues . I used both python SDK and CLI commands where both returns the same error CLI used : aws ec2 create-instance-export-task --instance-id i-***** --target-environment vmware --export-to-s3-task file://C:\file.json json file containing bucket and VM image

nginx proxy server localhost permission denied

感情迁移 提交于 2020-01-19 23:13:11
问题 I am just setting up nginx as a webserver that proxies directly to a tomcat app server. When the user connects to my website Nginx should redirect the request to port 8080 where the tomcat app server is running. I am doing everything on amazon ec2 instance that is running Redhat 7. What I have so far is this: nginx.conf file user nginx; worker_processes 1; server { listen 80; server_name mydomainname; access_log /var/log/nginx/example.log; error_log /var/log/nginx/example.error.log; location

nginx proxy server localhost permission denied

孤人 提交于 2020-01-19 23:11:05
问题 I am just setting up nginx as a webserver that proxies directly to a tomcat app server. When the user connects to my website Nginx should redirect the request to port 8080 where the tomcat app server is running. I am doing everything on amazon ec2 instance that is running Redhat 7. What I have so far is this: nginx.conf file user nginx; worker_processes 1; server { listen 80; server_name mydomainname; access_log /var/log/nginx/example.log; error_log /var/log/nginx/example.error.log; location

Best way to launch aws ec2 instances with ansible

倖福魔咒の 提交于 2020-01-19 04:46:37
问题 I'm trying to create an small webapp infrastructure with ansible on Amazon AWS and I want to do all the process: launch instance, configure services, etc. but I can't find a proper tool or module to deal with that from ansible. Mainly EC2 Launch. Thanks a lot. 回答1: This is the short answer of your question, if you want detail and fully automated role, please let me know. Thanks Prerequisite : Ansible Python boto library Set up the AWS access and secret keys in the environment settings (best

How to manage Service Quotas (also referred to as limits in AWS Account) using AWS CLI commands

旧时模样 提交于 2020-01-19 04:10:28
问题 How can I manage my Service Quotas (also referred to as limits in AWS Account) using AWS CLI commands 回答1: You simply search for a quota and put in your desired value to submit a quota increase request via Console or via AWS CLI . You can find answers to your most of the queries with exmaples here on one of below links : [+] Dev.to https://dev.to/dineshrathee12/manage-my-service-quotas-also-referred-to-as-limits-in-aws-account-using-aws-cli-commands-5cg2 [+] GitHub: https://github.com

AWS CLI to find out list of active reserved instances

橙三吉。 提交于 2020-01-17 14:02:52
问题 I am trying to find out list of reserved instances that are active. aws ec2 describe-reserved-instances --filters "Name=instance-state-State,Values=active" --query 'Reservations[].Instances[].Tags[?Key==`Name`].Value[]' The above command does not work, and I think the Name field is not right. Any help? Thanks 回答1: Here's another take on it. Put the search for State == `active` into the query statement. The output includes labels as well. By the way, changing from single-quotes around the

AWS CLI to find out list of active reserved instances

断了今生、忘了曾经 提交于 2020-01-17 14:00:08
问题 I am trying to find out list of reserved instances that are active. aws ec2 describe-reserved-instances --filters "Name=instance-state-State,Values=active" --query 'Reservations[].Instances[].Tags[?Key==`Name`].Value[]' The above command does not work, and I think the Name field is not right. Any help? Thanks 回答1: Here's another take on it. Put the search for State == `active` into the query statement. The output includes labels as well. By the way, changing from single-quotes around the