ashakshan
ashakshan

Reputation: 479

sceptre create fails with ERROR : "Session credentials were not found. Profile: None. Region: us-east-1."

I have two aws profiles in my config file like below

[profile projet]
region = us-east-1
output = json

[profile accPersonal]
region = us-east-1
output = json

and their respective credential files like below

[accPersonal]
aws_access_key_id = key_id
aws_secret_access_key = access_key

[projet]
aws_access_key_id = key_id
aws_secret_access_key = access_key

When I try to launch a sceptre create from command line

sceptre create dev/api-gateway/admin-key.yaml

I get the following error

ERROR : "Session credentials were not found. Profile: None. Region: us-east-1."

I used this command before multiple times to create resources in aws using sceptre and never had this issue, checked in the aws docs for configuring profiles, the configuration looks correct and I dont seem to understand why am getting that error

Upvotes: 0

Views: 540

Answers (1)

ashakshan
ashakshan

Reputation: 479

I figured out why I was getting that error

in my config.yaml file for sceptre

project_code: projet_api
region: us-east-1
AvailabilityZoneA: us-west-2a
AvailabilityZoneB: us-west-2b

I searched in the documentation [https://sceptre.cloudreach.com/1.4.2/environment_config.html][1] We need to add profile in the .yaml file for septre to read which profile we are creating the resources

I added profile to my config.yaml and it worked fine

project_code: projet_api
region: us-east-1
AvailabilityZoneA: us-west-2a
AvailabilityZoneB: us-west-2b
profile: projet

Upvotes: 0

Related Questions