amazon web services - Get files from S3 using Jython in Grinder test script

I have master/worker EC2 instances that I'm using for Grinder tests. I need to try out a load test that directly gets files from an S3 bucket, but I'm not sure how that would look in Jython for the Grinder test script.Any ideas or tips? I've looked into it a little and saw that Python has the boto package for working with AWS - would that work in Jython as well?(Edit - adding code and import errors for clarification.)Python approach:Did "pip install boto3"Test script:from net.grinder.script.Grinder import grinderfrom net.grinder.script import T...Read more

amazon web services - What's the difference between AWS SSO and AWS Cognito?

Let's say I have a few clients: corporation x, y, z. each of those corporation has their employees and their SSO (mostly saml but can be also openId or anything else). I want to be able to integrate with their SSO so they can log in to my application without giving me their credentials. Something like cloudfoundry UAA. Which one should i use: AWS SSO or AWS Cognito? what's the difference?...Read more

amazon web services - User Authentication (Signup & Login) on AWS with Lambda, Cognito or IAM

I've been looking to use various AWS services to handle the infrastructure for our next major project. We started looking at docker containers on EC2 instances, but after looking into AWS Lambda a bit more - it seems like a worthy path to explore. Using the AWS Lambda paradigm, we would simply use Lambda functions as the logical glue to hold our data and events (from other AWS services) together.For instance, if a user of our product creates a new record, AWS Lambda can be triggered on that event and we can call a lambda function to add that re...Read more

amazon web services - AWS API gateway with STS and Custom Authenticator -- anyone with example with browser client?

I'm haivng a hard time getting this one to work, and I'm wondering if anyone might have a working code example I can glean over. Here's my requirement:One AWS Lambda function (let's called it BizFunction), fronted by AWS API Gateway, and configured with custom authorizer.Another AWS Lambda function (let's called it LoginFunction), also fronted by AWS API without any authorization. During the login process, LoginFunction authenticates user's credential input against user database and, if verified, creates a Cognito identity with STS. The cred...Read more

amazon web services - Accessing client context in a Lambda function via API Gateway

I've created a Lambda function, and connected it to an API Gateway endpoint. My users are authenticating using Facebook via Cognito (so, obviously using a Federated Identity Pool). In my iOS app, I am able to authenticate properly, receive a Cognito Id back, and also properly execute my Lambda function by way of API Gateway. Where I'm stuck now is attempting to access the user's identity in my lambda. I understand from other threads & the AWS docs that I should use able to access the identity via context.identity.cognitoIdentityId in JS. Ho...Read more

amazon web services - AWS - Confirm User Cognito

I'm trying to register a user in a Cognito UserPool but I'm having issue with the Pre-signup trigger.I've configured a lambda like in the docs exampleexports.handler = (event, context, callback) => { event.response.autoConfirmUser=true; callback(null, event);};Using CloudWatch logs I can see that the autoConfirmUser attribute is correctly set to true, but the user isn't confirmed.Here is the account in the UserPool:Any idea how to fix this ?...Read more

amazon web services - AWS - Is there a way to 'hook' into when a federated identity is created for the first time?

I have a Cognito Identity Pool that is used to authenticate my front end users, as well as give them certain permissions in my application. However, I have encountered an issue with giving these users permission to access IoT, which involves invoking a Lambda calling iot.addPrincipalPolicy(), and once that is done then everything works flawlessly.However, the issue I am facing is that right now I am running this function is being called every time my user requests authentication, when it really only needs to be ran when the user signs up. Is th...Read more

amazon web services - AWS Cognito username/email login is case-sensitive

SetupI am using AWS Cognito to manage the user registration and user access for my web application. Specifically I am using the Cognito hosted UI. This means that Cognito presents a UI for my users to register, I do not have access to modify the user sign-up or login pages for my application (other than the controls provided by Cognito). I am using email addresses as usernames, so new users are simply asked to provide an email address and password.ProblemCognito treats email addresses as case sensitive. If a user signs up with the email address...Read more

amazon web services - What IP address do we give to clients to point to our domain on route 53?

I've done a bit of searching on Stack Overflow and the web but I can't seem to find an answer to this - I'm hoping it is possible.Currently, the flow for our cloud SaaS system is:Our domain name (Company A) -> Managed hosting (Company B) -> Loads our websiteWe can also ask clients to point their domain name to us, such that when you type in their domain name, it loads their website on our platform, not our website, e.g.:Our domain name (Company A) -> Managed hosting (Company B) -> Loads our websiteClient domain name (Company C) -> Managed hosti...Read more

amazon web services - How to configure an AWS Elastic IP to point to an OpenShift Origin running pod?

We have set up OpenShift Origin on AWS using this handy guide. Our eventualhope is to have some pods running REST or similar services that we can accessfor development purposes. Thus, we don't need DNS or anything like that at thispoint, just a public IP with open ports that points to one of our running pods.Our first proof of concept is trying to get a jenkins (or even just httpd!) podthat's running inside OpenShift to be exposed via an allocated Elastic IP.I'm not a network engineer by any stretch, but I was able to successuflly getan Elast...Read more

amazon web services - Installing authorized_keys file under custom user for Ubuntu AWS

I'm trying to setup an ubuntu server and login with a non-default user. I've used cloud-config with the user data to setup an initial user, and packer to provision the server:system_info: default_user: name: my_user shell: /bin/bash home: /home/my_user sudo: ['ALL=(ALL) NOPASSWD:ALL']Packer logs in and provisions the server as my_user, but when I launch an instance from the AMI, AWS installs the authorized_keys files under /home/ubuntu/.ssh/Packer config:{ "variables": { "aws_profile": "" }, "builders": [{ "t...Read more

How to push application code to Amazon EC2 servers in autoscaling mode, via Jenkins?

I have an environment in AWS where EC2 instances are in autoscaling mode, i.e. new instances spin up as per the load on deployed instances. Now, if I want to integrate this environment with Jenkins, how can I push my codes from Github to these EC2 instances, where my application is deployed. And with every change in my code version, Github should invoke EC2 instances to have the same versions deployed, and also every new instances should be created with this updated version of code, i.e. every autoscaled instances must have the same code versio...Read more

amazon web services - Query AWS CLI to populate Jenkins "Active Choices Reactive Parameter" (Linux)

I have a Jenkins 2.0 job where I require the user to select the list of servers to execute the job against via a Jenkins "Active Choices Reactive Parameter". These servers which the job will execute against are AWS EC2 instances. Instead of hard-coding the available servers in the "Active Choices Reactive Parameter", I'd like to query the AWS CLI to get a list of servers.A few notes:I've assigned the Jenkins 2.0 EC2 an IAM role which has sufficient privileges to query AWS via the CLI.The AWS CLI is installed on the Jenkins EC2.The "Active Cho...Read more