Questions tagged with DevOps
Content language: English
Sort by most recent
Serverless architecture best practice to replace an existing 3-tier Tomcat system
I am currently investigation on how to architect a new system with server less instead of going the Tomcat 3-tier system. It I call going well and one of our main issues are how do you manage big source code and big business logic. This is what the team is mostly unaware of. We know how to do this in a legacy system, but we are not sure if we will need to maintain tons of Lambdas, etc. We will have 4-5 devs working on this. I understand its a new way of working and system architecture, but we don't know at the moment how we could achieve this.
Ebconfigurations: Enable-WindowsOptionalFeature IIS-WebSockets fails reboot
Hi, I have ebextensios script that enable IIS-WebSockets and then a step to reboot the machine to enable it (cause enabling this feture requires reboot) but the reboot fails. ``` files: "C:/mysetup/app-server.ps1": content: | $LASTEXITCODE = 0 Write-Host "Unistall Windows Defender"; Uninstall-WindowsFeature -Name Windows-Defender Write-Host "Enable IIS WebSockets"; Enable-WindowsOptionalFeature -FeatureName IIS-WebSockets -Online -NoRestart exit $LASTEXITCODE container_commands: 03-configure-application-server: command: powershell.exe -NoProfile -ExecutionPolicy Bypass -File "C:/mysetup/app-server.ps1" ignoreErrors: true waitAfterCompletion: 0 04-reboot-server: command: powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "Restart-Computer -Confirm -Force" waitAfterCompletion: 0 ``` I tried iven with waitAfterCompletion: forever. Here's the error I get: ``` 2022-10-25 12:26:30,420 [INFO] Command 03-configure-application-server succeeded 2022-10-25 12:26:31,822 [ERROR] Command 04-reboot-server (powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "Restart-Computer -Confirm -Force") failed 2022-10-25 12:26:31,822 [ERROR] Error encountered during build of postbuild_1_pcube: Command 04-reboot-server failed Traceback (most recent call last): File "cfnbootstrap\construction.pyc", line 578, in run_config File "cfnbootstrap\construction.pyc", line 146, in run_commands File "cfnbootstrap\command_tool.pyc", line 127, in apply cfnbootstrap.construction_errors.ToolError: Command 04-reboot-server failed 2022-10-25 12:26:31,822 [ERROR] -----------------------BUILD FAILED!------------------------ 2022-10-25 12:26:31,822 [ERROR] Unhandled exception during build: Command 04-reboot-server failed Traceback (most recent call last): File "cfn-init", line 176, in <module> File "cfnbootstrap\construction.pyc", line 137, in build File "cfnbootstrap\construction.pyc", line 564, in build File "cfnbootstrap\construction.pyc", line 578, in run_config File "cfnbootstrap\construction.pyc", line 146, in run_commands File "cfnbootstrap\command_tool.pyc", line 127, in apply cfnbootstrap.construction_errors.ToolError: Command 04-reboot-server failed ``` Thanks Michele
Using AppConfig feature flags in CDK application
I want to use AppConfig feature flags in an application that is completely defined with CDK. Deployment is automated using CodePipeline that is triggered by changes in github repo. I would like to be able to deploy the AppConfig and the initial state of the flags as a part of the application deployment. I am trying to figure out a way to be able to make use of toggling the feature flags in AWS console without redeploying the whole application. My problem is, how does one deal with the values in the code falling out of sync with the flags that are toggled from console (For example when the branch is first deployed `my_flag` is `False`, and later I toggle it to `True`. Then I make some code change and push it and now there is a clash between the state of the flag in code and in reality, that was changed via console.) What is the best practice for reconciling use of IaC and AWS console here?
HELP!!!! Amazon SageMaker not writing best optimal route based on Genetic Algorithm to 2nd Output Dynamo Database(am stucked here&incurring dollar charges with no progress -Error Screenshot available)
My Challenges is this: I used CloudFormation template to deploy 2 Dynamo DB (Input and Output) and 1 IAM role to use AWS-managed Lamba Function for Genetic Algorithm, so Amazon SageMaker (using Jupyter Notebook on AWS) is meant to write the locations (X and Y coordinates into the input Dynamo DB **(Successful)**, **while the Docker file to Docker Image to Docker Container is also to be run by Amazon SageMaker to write the best Optimal Route based on Genetic Algorithm (Mutation, genomes and generation transfer mode of operation) to the 2nd Dynamo DB (Unsuccessful) and this is where I am stucked, have read a lot of materials and research a lot and even reached out to some Amazon AWS Community but they could not resolve it, Please will be glad if repost.aws can help please (Error Screenshot Available)**
Lex v2 Build - bot version - using aws cli command
Hi, I am working in lex v2, just want to know what is equal aws cli api method to build lex v2 bots. In old lex version we were using "aws lex-models put-bot" aws cli then we append "processBehavior": "BUILD" and that will build bot automatically , how i can able to Lex v2. Please any one share your thought, not able to find an answer for this query. Thanks Ram
Will Lambda deployed from image pull the ECR image on every startup
Because of Lambda’s ZIP deployment size limitation I’m changing the way I deploy my Lambda functions to use container image. The deployed function is located within a VPC, so I have a NAT gateway within that VPC to allow public internet traffic, so I need to know if I need to add a VPC endpoints for the ECR services or not (to minimise the traffics going through the NAT gateway). I’m not sure how/when the lambda pull the image from ECR. is it a 1-time pull that occur when deploying a new image version, or whenever a new lambda instance initialised (cold start)? [In the following post](https://aws.amazon.com/blogs/compute/working-with-lambda-layers-and-extensions-in-container-images/), it says > Lambda also optimizes the image and caches it close to where the functions runs so cold start times are the same as for .zip archives. But its not clear whether if it’ll still use ECR to get the image or it’ll uses some dedicated location “close to the lambda” ?
[CDK] how best to move from App to Stage
A while ago moved all our infrastructure from manually defined infrastructure to AWS CDK for easier management. We followed some tutorials for this and ended up with a CDK app that contains multiple stacks. Now we want to move to AWS CodePipelines for the CI/CD of our infrastructure, but this requires that the Stacks are part of a stage. This presents a problem, as adding these stacks to a stage (instead of an application) means that the stacks are prefixed with the name of the Stage, which causes a recreation of stateful resources (such as DNS, and Databases, Cognito UserPools). What is the best way to move these stacks from the application to a stage? Ideally, without recreating the resources in the stacks, or renaming the stacks. We have found various articles that say some resources could maybe be moved, but this a highly involved process that seems overly complicated. Source: https://binx.io/2022/06/30/migrate-resources-across-cdk-stacks/
I will create, deploy, fix, update website, api with python, flask
Hi, left you messages in regards to the Gig, I will create, deploy, fix, update website, api with python, flask: Can you help me with an existing PYTHON app that pulls data from my Amazon Play Books account and generates an Excel table. Until recently. I'm getting aborts at the end of this process and it's not generating the Excel file. Currently this app uses an internal server http://127.0.0.1:5000/ but the Python doc says I should use a WSGI server for production. I have well over 10,000 books in my ebook library and I suspect that this is more than the internal server can handle?
Use CDK or CloudFormation -> what justifications? Currently, the CDK is still used, whether with Java or another language?
Use CDK or CloudFormation -> what justifications? Currently, the CDK is still used, whether with Java or another language? -- I quote: "IT teams have two AWS-native options for infrastructure-as-code: AWS CloudFormation and AWS Cloud Development Kit (CDK). CloudFormation templates were AWS's first foray into cloud-based infrastructure-as-code, and while are useful, CloudFormation has clear weaknesses, more specifically, it lacks built-in logic features and has a steep learning curve. The AWS CDK, an open source software development framework for defining cloud infrastructure, addresses these weaknesses. The AWS CDK supports popular programming languages that developers can use to build, automate, and manage infrastructure based on an imperative approach. Finally, developers can provision these commands through CloudFormation."
How To Fail CodeDeploy When Hook Throws StdErr - Windows
Hi, I have CodeDeploy setup with an appspec file that calls a BeforeInstall.cmd and an AfterInstall.cmd. This is run on a Windows EC2 machine. I am finding that when there are stderr that occur within those hook scripts, the main CodeDeploy does not fail but shows as a success. I have seen people mention that you can somehow check the exit code but am unsure how to do this? Can someone shed some light on this please? Essentially, I would like the deployment to fail if there are any stderrs that occur. thanks
Tracking usage of Cloudformation templates and CDK Constructs across multiple accounts
Hello In my team we provide CloudFormation templates and CDK Constructs for other teams in our organization to use. We want to track where and what version of our templates and constructs are used across multiple accounts. We are currently setting tags in our templates and constructs but compiling the information has turned out more difficult. We have looked at AWS Config but the Advanced Queries doesn't allow querying on tags nor does it seem to allow me to query on all resource types, for example I can't seem to query for any types of ECS resources which would be relevant for us. Is there a good way to track this usage? Thank you