Need advice about which tool to choose?Ask the StackShare community!

Amazon Cognito

434
656
+ 1
32
AWS CloudTrail

253
217
+ 1
14
Add tool

Amazon Cognito vs AWS CloudTrail: What are the differences?

What is Amazon Cognito? Securely manage and synchronize app data for your users across their mobile devices. You can create unique identities for your users through a number of public login providers (Amazon, Facebook, and Google) and also support unauthenticated guests. You can save app data locally on users’ devices allowing your applications to work even when the devices are offline.

What is AWS CloudTrail? Record AWS API calls for your account and have log files delivered to you. With CloudTrail, you can get a history of AWS API calls for your account, including API calls made via the AWS Management Console, AWS SDKs, command line tools, and higher-level AWS services (such as AWS CloudFormation). The AWS API call history produced by CloudTrail enables security analysis, resource change tracking, and compliance auditing. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service.

Amazon Cognito can be classified as a tool in the "User Management and Authentication" category, while AWS CloudTrail is grouped under "Log Management".

Some of the features offered by Amazon Cognito are:

  • Manage Unique Identities
  • Work Offline
  • Store and Sync across Devices

On the other hand, AWS CloudTrail provides the following key features:

  • Increased Visibility- CloudTrail provides increased visibility into your user activity by recording AWS API calls. You can answer questions such as, what actions did a given user take over a given time period? For a given resource, which user has taken actions on it over a given time period? What is the source IP address of a given activity? Which activities failed due to inadequate permissions?
  • Durable and Inexpensive Log File Storage- CloudTrail uses Amazon S3 for log file storage and delivery, so log files are stored durably and inexpensively. You can use Amazon S3 lifecycle configuration rules to further reduce storage costs. For example, you can define rules to automatically delete old log files or archive them to Amazon Glacier for additional savings.
  • Easy Administration- CloudTrail is a fully managed service

"Backed by Amazon" is the top reason why over 11 developers like Amazon Cognito, while over 6 developers mention "Very easy setup" as the leading cause for choosing AWS CloudTrail.

Sendhelper Pte Ltd, Strain Merchant, and ChromaDex are some of the popular companies that use Amazon Cognito, whereas AWS CloudTrail is used by Netflix, Slack, and Seat Pagine Gialle. Amazon Cognito has a broader approval, being mentioned in 41 company stacks & 13 developers stacks; compared to AWS CloudTrail, which is listed in 38 company stacks and 12 developer stacks.

Advice on Amazon Cognito and AWS CloudTrail
Jigar Shah
Security Software Engineer at Pinterest · | 7 upvotes · 52.8K views

We would like to detect unusual config changes that can potentially cause production outage.

Such as, SecurityGroup new allow/deny rule, AuthZ policy change, Secret key/certificate rotation, IP subnet add/drop. The problem is the source of all of these activities is different, i.e., AWS IAM, Amazon EC2, internal prod services, envoy sidecar, etc.

Which of the technology would be best suitable to detect only IMP events (not all activity) from various sources all workload running on AWS and also Splunk Cloud?

See more
Replies (5)
Nati Abebe
Recommends
AWS Config

For continuous monitoring and detecting unusual configuration changes, I would suggest you look into AWS Config.

AWS Config enables you to assess, audit, and evaluate the configurations of your AWS resources. Config continuously monitors and records your AWS resource configurations and allows you to automate the evaluation of recorded configurations against desired configurations. Here is a list of supported AWS resources types and resource relationships with AWS Config https://docs.aws.amazon.com/config/latest/developerguide/resource-config-reference.html

Also as of Nov, 2019 - AWS Config launches support for third-party resources. You can now publish the configuration of third-party resources, such as GitHub repositories, Microsoft Active Directory resources, or any on-premises server into AWS Config using the new API. Here is more detail: https://docs.aws.amazon.com/config/latest/developerguide/customresources.html

If you have multiple AWS Account in your organization and want to detect changes there: https://docs.aws.amazon.com/config/latest/developerguide/aggregate-data.html

Lastly, if you already use Splunk Cloud in your enterprise and are looking for a consolidated view then, AWS Config is supported by Splunk Cloud as per their documentation too. https://aws.amazon.com/marketplace/pp/Splunk-Inc-Splunk-Cloud/B06XK299KV https://aws.amazon.com/marketplace/pp/Splunk-Inc-Splunk-Cloud/B06XK299KV

See more
Isaac Povey
Casual Software Engineer at Skedulo · | 5 upvotes · 35.3K views
Recommends
Terraform

While it won't detect events as they happen a good stop gap would be to define your infrastructure config using terraform. You can then periodically run the terraform config against your environment and alert if there are any changes.

See more
Matthew Rothstein
Recommends
Security Monkey

Consider using a combination of Netflix Security Monkey and AWS Guard Duty.

You can achieve automated detection and alerting, as well as automated recovery based on policies with these tools.

For instance, you could detect SecurityGroup rule changes that allow unrestricted egress from EC2 instances and then revert those changes automatically.

It's unclear from your post whether you want to detect events within the Splunk Cloud infrastructure or if you want to detect events indicated in data going to Splunk using the Splunk capabilities. If the latter, then Splunk has extremely rich capabilities in their query language and integrated alerting functions. With Splunk you can also run arbitrary Python scripts in response to certain events, so what you can't analyze and alert on with native functionality or plugins, you could write code to achieve.

See more
Vijayanand Narayanasharma
DevOps/TechOps Consultant at Qantas Loyalty · | 3 upvotes · 28.3K views
Recommends
AWS CloudTrail

Well there are clear advantages of using either tools, it all boils down to what exactly are you trying to achieve with this i.e do you want to proactive monitoring or do you want debug an incident/issue. Splunk definitely is superior in terms of proactively monitoring your logs for unusal events, but getting the cloudtrail logs across to splunk would require some not so straight forward setup (Splunk has a blueprint for this setup which uses AWS kinesis/Firehose). Cloudtrail on the other had is available out of the box from AWS, the setup is quite simple and straight forward. But analysing the log could require you setup Glue crawlers and you might have to use AWS Athena to run SQL Like query.

Refer: https://docs.aws.amazon.com/athena/latest/ug/cloudtrail-logs.html

In my personal experience the cost/effort involved in setting up splunk is not worth it for smaller workloads, whereas the AWS Cloudtrail/Glue/Athena would be less expensive setup(comparatively).

Alternatively you could look at something like sumologic, which has better integration with cloudtrail as opposed to splunk. Hope that helps.

See more
Recommends
AWS CloudTrail

I'd recommend using CloudTrail, it helped me a lot. But depending on your situation I'd recommed building a custom solution(like aws amazon-ssm-agent) which on configuration change makes an API call and logs them in grafana or kibana.

See more
Decisions about Amazon Cognito and AWS CloudTrail
Brent Maxwell
Migrated
from
Amazon Cognito
to
Auth0

I started our team on Amazon Cognito because I was a Solutions Architect at AWS and found it really easy to follow the tutorials and get a basic app up and running with it.

When our team started working with it, they very quickly became frustrated because of the poor documentation. After 4 days of trying to get all the basic passwordless auth working, our lead engineer made the decision to abandon it and try Auth0... and managed to get everything implemented in 4 hours.

The consensus was that Cognito just isn't mature enough or well-documented, and that the implementation does not cater for real world use cases the way that it should. I believe Amplify has made some of this simpler, but I would still recommend Auth0 as it's been bulletproof for us, and is a sensible price.

See more
Get Advice from developers at your company using Private StackShare. Sign up for Private StackShare.
Learn More
Pros of Amazon Cognito
Pros of AWS CloudTrail
  • 13
    Backed by Amazon
  • 7
    Manage Unique Identities
  • 3
    MFA
  • 3
    Work Offline
  • 2
    Store and Sync
  • 1
    It works
  • 1
    Integrate with Google, Amazon, Twitter, Facebook, SAML
  • 1
    SDKs and code samples
  • 1
    Free for first 50000 users
  • 7
    Very easy setup
  • 3
    Good integrations with 3rd party tools
  • 2
    Very powerful
  • 2
    Backup to S3

Sign up to add or upvote prosMake informed product decisions

Cons of Amazon Cognito
Cons of AWS CloudTrail
  • 3
    Massive Pain to get working
  • 2
    Login-UI sparsely customizable (e.g. no translation)
  • 2
    Documentation often out of date
  • 1
    MFA: there is no "forget device" function
  • 1
    Hard to find expiration times for tokens/codes
  • 1
    Lacks many basic features
  • 1
    There is no "Logout" method in the API
  • 1
    No recovery codes for MFA
  • 1
    Difficult to customize (basic-pack is more than humble)
  • 1
    Only paid support
  • 1
    Docs are vast but mostly useless
    Be the first to leave a con

    Sign up to add or upvote consMake informed product decisions

    What is Amazon Cognito?

    You can create unique identities for your users through a number of public login providers (Amazon, Facebook, and Google) and also support unauthenticated guests. You can save app data locally on users’ devices allowing your applications to work even when the devices are offline.

    What is AWS CloudTrail?

    With CloudTrail, you can get a history of AWS API calls for your account, including API calls made via the AWS Management Console, AWS SDKs, command line tools, and higher-level AWS services (such as AWS CloudFormation). The AWS API call history produced by CloudTrail enables security analysis, resource change tracking, and compliance auditing. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use Amazon Cognito?
    What companies use AWS CloudTrail?
    See which teams inside your own company are using Amazon Cognito or AWS CloudTrail.
    Sign up for Private StackShareLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Amazon Cognito?
    What tools integrate with AWS CloudTrail?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    What are some alternatives to Amazon Cognito and AWS CloudTrail?
    Auth0
    A set of unified APIs and tools that instantly enables Single Sign On and user management to all your applications.
    Okta
    Connect all your apps in days, not months, with instant access to thousands of pre-built integrations - even add apps to the network yourself. Integrations are easy to set up, constantly monitored, proactively repaired and handle authentication and provisioning.
    Firebase
    Firebase is a cloud service designed to power real-time, collaborative applications. Simply add the Firebase library to your application to gain access to a shared data structure; any changes you make to that data are automatically synchronized with the Firebase cloud and with other clients within milliseconds.
    AWS IAM
    It enables you to manage access to AWS services and resources securely. Using IAM, you can create and manage AWS users and groups, and use permissions to allow and deny their access to AWS resources.
    Keycloak
    It is an Open Source Identity and Access Management For Modern Applications and Services. It adds authentication to applications and secure services with minimum fuss. No need to deal with storing users or authenticating users. It's all available out of the box.
    See all alternatives