https://serverless-stack.com/ logo
#help
Title
# help
m

matt resnik

01/20/2022, 1:02 AM
Was going through the notes app guide.. got about half way through it.. ran into an issues with the adding auth section.. as you cant use the @aws-cdk/aws-iam package with cdk v2 .. found a fix for that.. but along the way something happened, now i am getting an error:
Copy code
Stack mattdev-notes-debug-stack
Status: failed
Error: The mattdev--notes-debug-stack stack contains no resources.
Even with a freshly initialized repo
f

Frank

01/20/2022, 7:11 PM
Hey @matt resnik, the stack name in the error seems weird with the extra dash
mattdev--notes-debug-stack
Did you get a chance to figure out the issue?
m

matt resnik

01/21/2022, 8:10 PM
Yeah.. i edited that to remove identifying info..
i did get it figured out
I had a default and a secondary entry in my aws credentials file
i had an env var set, so if i used the aws CLI, it was hitting the secondary account
but somehow... seems sst start was doing stuff on both accounts, solution was changing the credentials file to only have the default
f

Frank

01/24/2022, 8:35 AM
@matt resnik, can I trouble for what was ur aws credential file looked like (redact the value of course) I just wanted to see the format. Also what env var did you set, and where did u set it?
I will try to reproduce it on my end.
m

matt resnik

01/24/2022, 7:06 PM
export AWS_DEFAULT_PROFILE=secondaryprofilename
was the ENV var
and the format.. could be part of the problem.. i am on windows.. using wsl2... my credentials file was created in windows.. symlinked into the ubuntu VM... then i ran aws config on ubuntu.. and it added the secondary profile
so.. it actually had mismatched line endings
100% though.. it was hitting both accounts.. and removing the other profile from the setting fixed it... i had a bunch of stuff that got created on my work AWS account haha (!!)... fortunately in a different region than what we use
f

Frank

01/25/2022, 2:53 PM
Ah i see. Also try using the AWS_PROFILE env var instead of AWS_DEFAULT_PROFILE.
m

matt resnik

01/25/2022, 3:44 PM
ok, ill look at that.. it did have the desired effect when it came to aws cli.. that's how i checked at first to see what creds were being used in the env
perhaps cdk does it differently