My output.yml returned by aws cli looks like this:
ARN: random-arn
CreatedDate: 'some-random-date`
Name: random-name
SecretString: '{"Password":"fake-password","Hostname":"fake-host","Username":"fake-username"}'
VersionId: random-version
VersionStages:
- AWSCURRENT
I want to parse and fetch the Password and Username from the above file in bash to create another yaml file with below data:
Instance:
Password: fake-password
Username: fake-username
How can I do this in shell script?