Selenium WebDriver Automation Testing - amazon-web-services

I am connecting S3 service. But while connecting S3 bucket MFA(DUO code authentication) is coming, due to which I am unable to automate regressing test cases. Is there any solution for this?
1.Any REST API 2. AWS SDK 3.AWS CLI types.
Any help will appreciated.
My user is configured with AD credentials.
I am new bee and do not know anything.

Related

How to Approve aws sso login without Browser Support

aws sso login --profile //profile name// is usually open browser and ask for approval is there any other way we can do this without browser. I have a situation where I need to setup aws cli in my docker container and I can only use aws sso login and I don't want to use any selenium to handle browser approval since its looks complex so I want to do all in cli itself…
aws sso login takes a --no-browser flag which suppresses the browser launch
From there you can control the sso verification url via a browser automation library e.g. puppeteer.
You can also get the verification url via aws sso-oidc actions/commands.
An example in golang using go-rod is available on github here although this won't work with a non-mfa process flow, which is what you want here. The code at the link can be modded or updated to support that use-case with not a whole lot of effort.
Generally using aws sso isn't recommedended for this type of use-case. Instead, you're better off using IAM user credentials (while outside VPC for example) or if in a VPC - instance profiles if they're available.

AWS SFTP Gateway API test works but SFTP clients return authentication failure

I am settings up a AWS SFTP using Cognito as the identify provider. I have a working Gateway API and can run tests on that successfully.
When I come to connect to the SFTP instance the username and password are rejected. I've checked the log files and there are not entries indicating that any calls to the Gateway API were made at all. This to me suggests something wrong with the IAM role associated with the SFTP instance and therefore the Gateway API is not being called. From my reading the configuration appears to be correct.
I'm working from the following blog page.
https://agilevision.io/blog/aws/2019/02/06/integrate-aws-sftp-with-custom-identity-provider.html
Can anyone suggest what might be wrong.

403 Forbidden when trying to query AWS ElasticSearch cluster

I'm having issues performing requests using jest to an AWS ElasticSearch cluster v5.3.
Reason is:
The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details
I am using windows 10 with java 11, spring boot 2, webflux, jest and the aws http request signer that they point to in their documentation.
I've checked and doubled checked the access and secret keys of the IAM user. I also added policies for the IAM user of full control over the cluster, still the 403 message.
Removing or adding the Content-Length header yields the same error.
Not sure where to go from here.
Any help would be appreciated.
Thx
So from I discovered, is that the network issue had something to do with the corporate proxy. I created a tunnel between my laptop and the ElasticSearch cluster, removed the proxy from the http client used by jest, and things work smoothly now.
I wasn't able to figure out exactly how the proxy affected the request signature though, but I'll stick with the tunnel solution.

Connect Auth0 client app to AWS RDS database

I just started using Auth0 last week. Can anyone provide details on how you setup an Auth0 client, that connects to a custom RDS MySQL database? I"m trying to authenticate users form a Drupal Install via a login form and I consistently receive a "401" error.
I think you need to configure both auth0 and AWS (IAM) for this, kindly go through documentation provided.
Call AWS APIs and Resources Securely with Tokens
Edit 1: Do Refer to commet , will update accordingly.

Cannot create AWS-SNS GCM account, showing invalid credentials message

I have looked for resources on this particular problem with little luck so far so I thought I would try here.
I am attempting to create an Amazon Web Service Simple Notification Service app in the AWS-SNS console using GCM. I have created the APNS app for the iOS version with no troubles, however, when attempting to create the GCM version I receive the error: "The credentials you entered are invalid. Please enter valid credentials and try again."
In the Google APIs - API Access dashboard I have created both a key for server app and a key for android app. Below are a few screenshots to illustrate the problem.
Any suggestions as to what the problem may be or any instructional documentation recommendations would be tremendously appreciated.
More on what Rohan has said, it would be on Google's end rather than Amazon's.
Delete the Server API Key in the Google API Console, and create a new one, allowing all IP addresses. Add the new key in AWS SNS, and you should be good to go!
Amazon documentation is very old and not accurate anymore.
When you created your Application and the Credentials on Google Developers Console, from the left menu on Google developer console select:
APIs & auth -> APIs -> Google Cloud Messaging for Android -> Enable API
Google recently migrated a lot of the GCM service/credential handling to Firebase. As a result you need to create a Server Key in the Firebase Console now.
See: Amazon SNS: "Platform credentials are invalid" when re-entering a GCM API key that previously worked
You need to use the API key listed under Key for server apps (with IP locking) in the Google Console. The key listed under Android app will not work.
The Amazon SNS Getting Started with GCM documentation provides step-by-step guidance on setting up your app. If you are still having issues, please contact us via AWS Support or the Amazon SNS forum and we can troubleshoot further.
full disclosure: I am an Amazon SNS engineer.