79488611

Date: 2025-03-06 08:03:58
Score: 2
Natty:
Report link

Updated : I use Fn::Transform "AWS::Include" to solve it.

#JobDefinition

    TaskProperties:
         Containers:
          - Name: TestContainer01
            Fn::Transform:  # this is the "Secrets, parse only it value did not work
              Name: "AWS::Include"
              Parameters:
                Location: "s3://xxx/secretfile.yaml"

#secretfile.yaml -> i got error if i do not parse entire Secrets object

Secrets 
 - Name: APP_MODE_ENV
   ValueFrom: "arn:aws:secretsmanager:ap-northeast-1:123456789:secret:dev/test-us7Vjm:APP_MODE_ENV::"
 - Name: APP_API_DATABASE_HOST
   ValueFrom: "arn:aws:secretsmanager:ap-northeast-1:123456789:secret:dev/test-us7Vjm:APP_API_DATABASE_HOST::"
  ...

I got below error, so i needed to parse entire "Secrets" object.

Transform AWS::Include failed with: The specified S3 object's content should be valid Yaml/JSON

Reasons:
  • Blacklisted phrase (0.5): i need
  • Blacklisted phrase (1): did not work
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: luan nguyen