Use of Parameter Store in Elastic Beanstalk ebextension config

0

Hi

I need help to use Parameter Store variables in Elastic Beanstalk ebextension config but I getting error while depoying using Codepipeline.

Here is my file in /.ebextensions/certs.config


option_settings:
  aws:elasticbeanstalk:application:environment: 
    SSL-BUCKET: '{{resolve:ssm:SSL-BUCKET:2}}' 
    
Resources:
  AWSEBAutoScalingGroup:
    Metadata:
      AWS::CloudFormation::Authentication:
        S3Auth:
          type: "s3"
          buckets: ["$SSL-BUCKET"]
          roleName: 
            "Fn::GetOptionSetting": 
              Namespace: "aws:autoscaling:launchconfiguration"
              OptionName: "IamInstanceProfile"
              DefaultValue: "aws-elasticbeanstalk-ec2-role"
              
files: 
  # Chain Crt
  "/etc/pki/tls/certs/certs.crt":
    mode: "000644"
    owner: root
    group: root
    authentication: "S3Auth"
    source: https://{$SSL-BUCKET}.s3.ca-central-1.amazonaws.com/certs.crt
    ignoreErrors: true  

container_commands:   
  01-build:
    command: "npm run build"
  02-restart_nginx:
    command: "service nginx restart"   

Is anyone can help

  • Hello, Can you elaborate on what error you are receiving?

  • Hi Andrew

    here is log of eb-engine

    2023/07/24 13:32:07.448603 [INFO] Error occurred during build: Failed to retrieve https://$SSL-BUCKET.s3.ca-central-1.amazonaws.com/cert.crt: 'NoneType' object has no attribute 'is_default'

    2023/07/24 13:32:07.448631 [ERROR] An error occurred during execution of command [app-deploy] - [PreBuildEbExtension]. Stop running the command. Error: EbExtension build failed. Please refer to /var/log/cfn-init.log for more details.

    2023/07/24 13:32:07.448637 [INFO] Executing cleanup logic 2023/07/24 13:32:07.448775 [INFO] CommandService Response: {"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"Engine execution has encountered an error.","returncode":1,"events":[{"msg":"Instance deployment failed. For details, see 'eb-engine.log'.","timestamp":1690205527448,"severity":"ERROR"}]}]}

    2023/07/24 13:32:07.449685 [INFO] Platform Engine finished execution on command: app-deploy

profile picture
Paresh
질문됨 10달 전90회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠