Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinpoint configuration mobiletargeting:PutEvents action does not exist #296

Closed
izieg-lo3 opened this issue Dec 10, 2018 · 13 comments
Closed

Comments

@izieg-lo3
Copy link

I am following this guide: https://aws-amplify.github.io/docs/js/analytics

When creating the policy specified in this guide:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "mobiletargeting:UpdateEndpoint",
                "mobiletargeting:PutEvents"
            ],
            "Resource": [
                "arn:aws:mobiletargeting:*:${accountID}:apps/${appId}*"
            ]
        }
    ]
}

Using the IAM Management Console in AWS to create this policy, it reports that the mobiletargeting:PutEvents action does not exist.

What action are we supposed to use here?

@frankmuellr frankmuellr added the amplify/js Issues tied to JS label Dec 11, 2018
@kunsachdeva
Copy link

Facing the same problem.
This part of the setup is not implementable - Update Your IAM Policy.
And hence, it gives following error AWSPinpointProvider - Please ensure you have updated you Pinpoint IAM Policywith the Action: "mobiletargeting:PutEvents" in order tocontinue using AWS Pinpoint Service

@sshilko
Copy link

sshilko commented Jan 14, 2019

@izieg-lo3 i was able to set the policy in AWS exactly as described in PinPoint project settings setup section, including "mobiletargeting:PutEvents".
Previously we created PinPoint project in end of September 2018 and this particular action was NOT included in policy.

My speculation is AWS changed something in SDK, as with latest SDK we saw problems w/o this "mobiletargeting:PutEvents" permissions.

Anyway AWS IAM editor works fine with "mobiletargeting:PutEvents" and accepts it, as per PinPoint project setup.

@schellack
Copy link

This issue appears to still occur. Here's a screenshot of the error in the IAM Policy editor:
image

@roborourke
Copy link
Contributor

Same problem here. It's strange because events are properly recorded via Analytics.autoTrack() but not when using Analytics.record(). It's a total blocker to evaluating and implementing anything with this right now.

@sshilko
Copy link

sshilko commented Feb 18, 2019

Just posting as noone posted yet, using this as per project configuration page

https://console.aws.amazon.com/pinpoint/home/?region=us-east-1#/apps/YOURPROJECTID/settings/push

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "mobiletargeting:PutEvents"
      ],
      "Resource": [
          "arn:aws:mobiletargeting:us-east-1:123123123123:apps/YOURPROJECTID"
      ]
    },
    {
      "Effect": "Allow",
      "Action": [
          "mobiletargeting:UpdateEndpoint"
      ],
      "Resource": [
          "arn:aws:mobiletargeting:us-east-1:123123123123:apps/YOURPROJECTID"
      ]
    },
    {
      "Effect": "Allow",
      "Action": [
          "mobileanalytics:PutEvents"
      ],
      "Resource": [
          "*"
      ]
    }
  ]
}

@roborourke
Copy link
Contributor

Anyone else seeing this issue - for me it helped to turn on debug mode, the error message with regards to the IAM role is a red herring.

I set a breakpoint and stepped back through the call stack, in my case it turned out I had some custom attributes being recorded that were not of type "string". It'd be good if some type detection could be inferred but for now you have to force all attributes to be strings.

@quintensis
Copy link

Try using the Logging DEBUG option with. It culd show you the reason why.

import Amplify, { ConsoleLogger as Logger} from '@aws-amplify/core';
Amplify.Logger.LOG_LEVEL = 'DEBUG';

@quintensis
Copy link

We also had the IAM role issue. It turned out that the Cognito identity pool did not allow "Unauthenticated identities". After checking "Enable access to unauthenticated identities" in the identity pool, the issue was fixed.

@jordanranz
Copy link
Contributor

@izieg-lo3 or anyone on this thread, are you guys still have issue with the documentation here/what should be changed?

@sshilko
Copy link

sshilko commented Jun 10, 2019

No issue anymore, not using Pinpoint anymore 👍

@stale
Copy link

stale bot commented Jun 17, 2019

This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.

@stale stale bot closed this as completed Jun 17, 2019
@kaushikbhanu
Copy link

this is sad

@kaushikbhanu
Copy link

"No issue anymore, not using Pinpoint anymore " this is acceptable ?

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

No branches or pull requests

10 participants