Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29248

Permission denied trying to move file for loading test and prod properties - AWS ebextensions

$
0
0

I read a lot of other answers but with no success, my goal is to load different properties reading environment name.

I have this structure

.ebextensions/properties/test_properties
.ebextensions/properties/prod_properties

and I would move and rename one of these file in .ebextensions to be load after changing extension in ".config"

I have this 00_environment.config in .ebextensions with

option_settings:
  aws:elasticbeanstalk:application:environment:
    MYENV: '`{ "Ref" : "AWSEBEnvironmentName" }`'  # get the current environment name

files:
  ".ebextensions/move.sh":
    mode: "000755"
    owner: root
    group: root

container_commands:
  01_mycommand:
    command: .ebextensions/move.sh
    test: '[[ $MYENV = "env-test" ]]'

Move.sh (into folder .ebextensions)

mv properties/test_properties test_properties.config

Logs in eb-activity.log

[2020-01-02T11:40:52.984Z] INFO  [10053] - [Application update awscodestar--15zqrpf3jh1dc@114/AppDeployStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild/postbuild_2_mysoft_test/Command 01_mycommand] : Activity execution failed, because: /bin/sh: .ebextensions/move.sh: Permission denied
   (ElasticBeanstalk::ExternalInvocationError)

Viewing all articles
Browse latest Browse all 29248

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>