I think I’m now having issues around permissions?
# help
d
I think I’m now having issues around permissions?
t
can I see the stack code that adds this permission?
d
Copy code
const api = new sst.Api(this, 'Api', {
      routes: {
        'GET /': {
          function: {
            handler: 'src/lambda.handler',
            timeout: 20,
            environment: { SSM_HUBSPOTAPIKEY, EPSAGON_TOKEN, STACKNAME },
            permissions: [
              new iam.PolicyStatement({
                actions: ['ssm:*'],
                effect: iam.Effect.ALLOW,
                resources: [`arn:aws:ssm:${REGION}:${ACCOUNT_ID}:parameter${SSM_HUBSPOTAPIKEY}`],
              }),
            ],
          },
        },
      },
    })
@thdxr
t
Hmm. I'm not sure - I do recall some difficulty getting this to work on my end. Was maybe something with the
/
but that might be because I was fetching multiple params at once
d
weird… it works now. Something about the deployment wasn’t updated
I just restarted
yarn sst start
and now it works 🤷
THANKS! 👍
j
Hmm I wonder if this is a bug on our side @Frank?
f
Roger! Taking a look at this
hmm.. wasn’t able to reproduce the issue.. hey@Dan Van Brunt if it happens again, could you DM me your
.build/sst-debug.json
, and I will take a quick look 😁
t
Is it possible that the redeploy wasn't run (press enter to redeploy) ?
f
Yeah I want to guess that’s what happened. Only the debug log knows the truth 😉
d
I’ll def send if it happens again. My first assumption is always something I did