Skip to content

Problem with aws command #62

Description

@juantarrel

I just trying to execute something like this, but is not working
aws iot attach-principal-policy --policy-name 'G4APPTV' --principal 'us-west-2:03ee51b1-1ffe-456c-ae6b-0a2c9d610f70'

the role of the lambda has admin credentials, i dont sure what's going on

this is all the code

#!/bin/bash

handler () {
    set -e
    EVENT_DATA=$1
    identityId=`echo "$EVENT_DATA" | jq -r ".request.userAttributes" | sed -e "s/custom:identityId/identityId/g" | jq -r '.identityId'` 
    aws iot attach-principal-policy --policy-name 'G4APPTV' --principal 'us-west-2:03ee51b1-1ffe-456c-ae6b-0a2c9d610f70'
    echo "{\"success\": true}" >&2
}

Can you help with that?

ty

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions