내 타겟이 AWS Beanstalk을 사용하고 있고, Rails 애플리케이션을 기반으로하는 과중한 작업을 처리 할 응용 프로그램 환경 유형 'Worker'를 만듭니다. AWS Beanstalk Worker Environment를 생성합니다. 환경 계층 : Ruby, 64 비트 Amazon Linux에서 1.9.3 환경 유형 : 단일 인스턴스 (64 비트 Amazon Linux 2014.03 v1.0.3에서 동일한 결과를 얻은 Ruby 2.0 (Puma)을 실행하려고했습니다.AWS Beanstalk Worker가 SQS 데몬을 시작할 수 없습니다. aws-sqsd
GEMS 및 데이터베이스 연결에 대한 모든 문제를 해결 한 후 "aws-sqs"대기열 클라이언트를 시작했습니다. 대기열을 청취하고 Worker 응용 프로그램에 HTTP 요청을 수행해야합니다. 나는이 노동자 인스턴스에 대한 ENV 변수에 AWS_ACCESS_KEY_ID 및 AWS_SECRET_KEY을 제공했습니다 여기
$ export | grep AWS
declare -x AWS_ACCESS_KEY_ID="AK...........Q"
declare -x AWS_AUTO_SCALING_HOME="/opt/aws/apitools/as"
declare -x AWS_CLOUDWATCH_HOME="/opt/aws/apitools/mon"
declare -x AWS_ELB_HOME="/opt/aws/apitools/elb"
declare -x AWS_IAM_HOME="/opt/aws/apitools/iam"
declare -x AWS_PATH="/opt/aws"
declare -x AWS_RDS_HOME="/opt/aws/apitools/rds"
declare -x AWS_SECRET_KEY="Hp.....fI"
declare -x EB_CONFIG_SYSTEM_AWSEBAGENTID=""
declare -x EB_CONFIG_SYSTEM_AWSEBREFERRERID=""
로그입니다 출력 : 또한
2014-05-19T13:58:59Z init: initializing aws-sqsd 1.0 (2013-12-23)
2014-05-19T13:58:59Z start: polling https://sqs.us-east-1.amazonaws.com/201266939336/awseb-e-dq8cqaud2z-stack-AWSEBWorkerQueue-18836XBBHNDUD
2014-05-19T13:58:59Z fatal: AWS::Errors::MissingCredentialsError:
Missing Credentials.
Unable to find AWS credentials. You can configure your AWS credentials
a few different ways:
* Call AWS.config with :access_key_id and :secret_access_key
<<<
* On EC2 you can run instances with an IAM instance profile and credentials
will be auto loaded from the instance metadata service on those
instances.
* Call AWS.config with :credential_provider. A credential provider should
either include AWS::Core::CredentialProviders::Provider or respond to
the same public methods.
= Ruby on Rails
In a Ruby on Rails application you may also specify your credentials in
the following ways:
* Via a config initializer script using any of the methods mentioned above
(e.g. RAILS_ROOT/config/initializers/aws-sdk.rb).
* Via a yaml configuration file located at RAILS_ROOT/config/aws.yml.
This file should be formated like the default RAILS_ROOT/config/database.yml
file.
내가 내 레일의 설정/초기화/AWS-sdk.rb이 이 내용이있는 응용 프로그램 :
AWS.config(
access_key_id: ENV["AWS_ACCESS_KEY_ID"],
secret_access_key: ENV["AWS_SECRET_ACCESS_KEY"])
Daemon aws-sqs가 전혀 시작되지 않았습니다. 다른 방법으로 aws-sqs를 구성 할 수 있습니까?